@charset "UTF-8";
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;700;900&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    background: #0a0a0a;
    color: #fff;
    line-height: 1.5;
    font-family: 'Inter', Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: 'Inter', Arial, sans-serif;
    min-height: 100vh;
}

.container {
    max-width: 480px;
    margin: 0 auto;
    padding: 0 16px;
}

/* === HEADER === */
#header {
    background: #111;
    border-bottom: 1px solid rgba(0, 230, 0, 0.2);
    padding: 0;
}

#header .container {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 54px;
}

.logo {
    font-size: 1.6em;
    font-weight: 900;
    letter-spacing: 1px;
}

.logo-green {
    color: #00e600;
}

.logo-white {
    color: #fff;
}

/* === GREEN BAR === */
#b {
    background: #00e600;
    color: #000;
    padding: 10px 0;
    text-align: center;
    font-weight: 900;
    font-size: 0.9em;
}

/* === MAIN CONTENT === */
#content {
    padding: 20px 0 60px;
}

#d {
    font-size: 1.1em;
    font-weight: 700;
    margin-bottom: 12px;
    color: #fff;
}

#e {
    font-size: 0.9em;
    margin-bottom: 20px;
    color: #ccc;
    line-height: 1.6;
}

/* === INSTRUCTION CARD === */
#instructions {
    background: #1e1e1e;
    border: 1px solid rgba(0, 230, 0, 0.15);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 20px;
    text-align: center;
}

#g {
    font-size: 0.9em;
    color: #ccc;
    margin-bottom: 6px;
}

#h {
    font-weight: 900;
    font-size: 1em;
    color: #ffd700;
}

/* === ARROW BOUNCE === */
.arrow {
    color: #00e600;
    font-size: 1.2em;
    animation: bounce 0.6s ease infinite;
    display: inline-block;
}

@keyframes bounce {
    0%, 100%, 20%, 53%, 80% {
        animation-timing-function: cubic-bezier(.215, .61, .355, 1);
        transform: translateY(0);
    }
    40%, 43% {
        animation-timing-function: cubic-bezier(.755, .05, .855, .06);
        transform: translateY(-12px);
    }
    70% {
        animation-timing-function: cubic-bezier(.755, .05, .855, .06);
        transform: translateY(-6px);
    }
    90% {
        transform: translateY(-2px);
    }
}

/* === BOXES GRID === */
#boxes-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin: 16px 0 24px;
}

.box-cell {
    display: flex;
    align-items: center;
    justify-content: center;
}

.box-link {
    display: block;
    text-decoration: none;
    transition: transform 0.25s ease, filter 0.25s ease;
    cursor: pointer;
}

.box-link:hover {
    transform: scale(1.1);
    filter: drop-shadow(0 0 12px rgba(0, 230, 0, 0.6));
}

.box-link:active {
    transform: scale(0.95);
}

.box-svg {
    width: 80px;
    height: 70px;
    display: block;
}

.box-opened {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.5;
}

.box-won {
    display: flex;
    align-items: center;
    justify-content: center;
    animation: glow-pulse 1s ease infinite alternate;
}

@keyframes glow-pulse {
    from { filter: drop-shadow(0 0 6px rgba(0, 230, 0, 0.4)); }
    to { filter: drop-shadow(0 0 18px rgba(0, 230, 0, 0.8)); }
}

/* === LIKES BAR === */
#likes-bar {
    background: #1e1e1e;
    padding: 10px 14px;
    margin-bottom: 4px;
    border-radius: 8px;
    font-size: 0.8em;
    color: #aaa;
    display: flex;
    align-items: center;
    gap: 6px;
}

.like-icon {
    display: inline-block;
    width: 14px;
    height: 14px;
    background: #00e600;
    border-radius: 50%;
    position: relative;
    vertical-align: middle;
}

.like-icon::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 4px;
    width: 6px;
    height: 4px;
    border-bottom: 2px solid #000;
    border-left: 2px solid #000;
    transform: rotate(-45deg);
}

#l {
    color: #00e600;
    font-weight: 700;
}

/* === COMMENTS === */
#comments-list {
    margin-top: 4px;
}

.comment-item {
    background: #1e1e1e;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 4px;
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.comment-avatar {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
}

.comment-avatar svg {
    display: block;
}

.comment-body {
    flex: 1;
    min-width: 0;
}

.comment-name {
    font-weight: 700;
    color: #00e600;
    font-size: 0.85em;
    margin-bottom: 4px;
}

.comment-text {
    font-size: 0.85em;
    color: #ccc;
    line-height: 1.5;
    margin-bottom: 6px;
}

.comment-text p {
    margin-bottom: 4px;
}

.comment-meta {
    font-size: 0.75em;
    color: #00e600;
}

.comment-meta .like-icon {
    width: 10px;
    height: 10px;
}

.comment-meta .like-icon::after {
    top: 2px;
    left: 3px;
    width: 4px;
    height: 3px;
    border-width: 1.5px;
}

.like-text, .like-text-empty {
    color: #00e600;
}

.comment-time {
    color: #666;
    border-bottom: 1px dotted #666;
}

/* === MODAL OVERLAY === */
#modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(10, 10, 10, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 100;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

#modal-overlay.active {
    opacity: 1;
}

/* === MODALS === */
.modal {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 101;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-content {
    background: #1e1e1e;
    border: 1px solid rgba(0, 230, 0, 0.3);
    border-radius: 16px;
    padding: 28px 24px;
    max-width: 400px;
    width: 100%;
    text-align: center;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.6), 0 0 20px rgba(0, 230, 0, 0.1);
    transform: scale(0.8);
    opacity: 0;
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
}

.modal-content.active {
    transform: scale(1);
    opacity: 1;
}

.modal-title {
    font-weight: 900;
    font-size: 1.3em;
    margin-bottom: 8px;
    color: #fff;
}

.modal-subtitle {
    font-size: 1em;
    margin-bottom: 12px;
    color: #ffd700;
    font-weight: 700;
}

.modal-desc {
    margin: 12px 0 20px;
}

.modal-desc p {
    font-size: 0.9em;
    margin-bottom: 8px;
    line-height: 1.5;
    color: #ccc;
}

.modal-desc strong {
    color: #fff;
}

.modal-btn {
    margin-top: 8px;
}

.modal-btn a {
    display: inline-block;
    padding: 12px 40px;
    background: #00e600;
    color: #000;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 900;
    font-size: 1em;
    min-width: 180px;
    transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 16px rgba(0, 230, 0, 0.3);
}

.modal-btn a:hover {
    background: #00cc00;
    transform: translateY(-1px);
    box-shadow: 0 6px 24px rgba(0, 230, 0, 0.5);
}

.modal-btn a:active {
    transform: translateY(0);
}

/* === MODAL ICON ANIMATION (modal 1) === */
.modal-icon {
    margin-bottom: 12px;
}

.modal-icon svg {
    animation: wiggle 1s ease-in-out infinite;
}

@keyframes wiggle {
    0% { transform: rotate(-10deg); }
    50% { transform: rotate(10deg); }
    100% { transform: rotate(-10deg); }
}

/* === MODAL 2 SPECIFIC === */
#modal-2 .modal-icon svg {
    animation: none;
}

/* === RESPONSIVE === */
@media (max-width: 480px) {
    .container {
        padding: 0 12px;
    }

    #boxes-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }

    .box-svg {
        width: 70px;
        height: 61px;
    }

    .modal-content {
        padding: 24px 18px;
    }

    .modal-btn a {
        min-width: 160px;
        padding: 11px 30px;
    }
}

@media (max-width: 360px) {
    #boxes-grid {
        gap: 6px;
    }

    .box-svg {
        width: 60px;
        height: 53px;
    }
}
