/* BASE STYLES */
:root {
    --bg-dark: #121212;
    --card-bg: rgba(30, 30, 30, 0.85);
    --text-light: #f0f0f0;
    --border-color: #444;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    touch-action: none; /* Enable custom touch handling */
}

body {
    background-color: var(--bg-dark);
    color: var(--text-light);
    font-family: 'Roboto Mono', monospace;
    min-height: 100vh;
    position: relative;
    overflow: hidden;
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(40, 40, 40, 0.1) 0%, transparent 20%),
        radial-gradient(circle at 90% 80%, rgba(40, 40, 40, 0.1) 0%, transparent 20%);
}

/* COMMENT FORM */
.comment-form {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1000;
    background: rgba(20, 20, 20, 0.7);
    padding: 15px;
    border-radius: 8px;
    width: 300px;
    border: 1px solid var(--border-color);
    backdrop-filter: blur(5px);
}

.comment-form input,
.comment-form textarea,
.comment-form button {
    width: 100%;
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: rgba(30, 30, 30, 0.8);
    color: var(--text-light);
    font-family: 'Roboto Mono', monospace;
    font-size: 14px;
}

.comment-form textarea {
    min-height: 80px;
    resize: vertical;
}

.comment-form button {
    background: #2c2c2c;
    cursor: pointer;
    transition: background 0.2s;
}

.comment-form button:hover {
    background: #3a3a3a;
}

/* COMMENT CARDS */
#comments-container {
    position: relative;
    min-height: 100vh;
    width: 100vw;
}

.comment-card {
    position: absolute;
    background: var(--card-bg);
    border-radius: 6px;
    padding: 15px;
    border: 1px solid var(--border-color);
    backdrop-filter: blur(3px);
    width: 250px;
    cursor: grab;
    transition: opacity 0.2s;
    user-select: none;
    z-index: 100; /* Lower than form */
    touch-action: none; /* Enable custom touch handling */
}

.comment-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
    font-size: 14px;
}

.username {
    font-weight: bold;
    color: #d0d0d0;
}

.timestamp {
    color: #888;
    font-size: 0.85em;
}

.comment-text {
    line-height: 1.5;
    font-size: 0.95em;
    color: #e0e0e0;
}

/* ANIMATIONS */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.comment-card {
    animation: fadeIn 0.4s ease-out forwards;
}

/* Mobile touch area indicator */
@media (hover: none) {
    .comment-card {
        cursor: pointer;
    }
    
    .comment-card:active {
        cursor: grabbing;
    }
}
/* PASSWORD PROMPT */
#password-prompt {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(18, 18, 18, 0.95);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
}

.password-card {
    background: rgba(30, 30, 30, 0.9);
    border-radius: 8px;
    padding: 25px;
    border: 1px solid var(--border-color);
    backdrop-filter: blur(10px);
    width: 280px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.password-header {
    text-align: center;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
    font-size: 14px;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: #888;
}

.password-card form {
    position: relative;
}

.password-card input {
    background: transparent;
    border: none;
    width: 100%;
    padding: 10px 0;
    color: var(--text-light);
    font-family: 'Roboto Mono', monospace;
    font-size: 18px;
    text-align: center;
    outline: none;
    caret-color: #888;
}

.password-line {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: var(--border-color);
    transition: background 0.3s;
}

.password-card input:focus + .password-line {
    background: #888;
}

.password-card button {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: #888;
    font-size: 24px;
    cursor: pointer;
    transition: color 0.3s;
    padding: 0 5px;
}

.password-card button:hover {
    color: var(--text-light);
}

/* ERROR INDICATOR */
.error-indicator {
    position: absolute;
    bottom: -25px;
    left: 50%;
    transform: translateX(-50%);
    width: 10px;
    height: 10px;
    background: #ff5555;
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(255, 85, 85, 0.5);
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0% { opacity: 0.3; transform: translateX(-50%) scale(0.8); }
    50% { opacity: 1; transform: translateX(-50%) scale(1.2); }
    100% { opacity: 0.3; transform: translateX(-50%) scale(0.8); }
}

/* SPECIAL CELEBRATION STYLES */
#special-celebration {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 3000;
}

#sto-lat {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 15vw;
    font-weight: bold;
    color: white;
    text-shadow: 
        0 0 10px rgba(255,255,255,0.8),
        0 0 20px rgba(255,0,0,0.8),
        0 0 30px rgba(255,255,0,0.8),
        0 0 40px rgba(0,255,0,0.8),
        0 0 50px rgba(0,0,255,0.8);
    animation: celebrate 2s infinite alternate;
    text-align: center;
    z-index: 3002;
}

@keyframes celebrate {
    0% { transform: translate(-50%, -50%) scale(1); }
    100% { transform: translate(-50%, -50%) scale(1.1); }
}

#confetti-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 3001;
}
