:root {
    --primary-color: #8b5cf6;
    --primary-hover: #a78bfa;
    --secondary-color: #1f2937;
    --text-primary: #f9fafb;
    --text-secondary: #9ca3af;
    --background: #000000;
    --surface: #111827;
    --surface-light: #1f2937;
    --border: #374151;
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
    
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.5);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.5), 0 2px 4px -2px rgb(0 0 0 / 0.3);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.5), 0 4px 6px -4px rgb(0 0 0 / 0.3);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.7), 0 8px 10px -6px rgb(0 0 0 / 0.5);
    
    --radius: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Светлая тема */
body.light-theme {
    --primary-color: #6366f1;
    --primary-hover: #5856eb;
    --secondary-color: #f1f5f9;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --background: #ffffff;
    --surface: #f8fafc;
    --surface-light: #f1f5f9;
    --border: #e2e8f0;
    
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}

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

body {
    font-family: 'Inter', sans-serif;
    background: var(--background);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color 0.5s ease, color 0.5s ease;
}

/* Интерактивный минималистичный фон */
#interactiveBackground {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

/* Общие стили */
.page {
    min-height: 100vh;
    position: relative;
    z-index: 1;
    opacity: 0;
    transform: translateY(20px);
    transition: var(--transition);
    display: none;
}

.page.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.hidden {
    display: none !important;
}

/* Навигация */
header {
    position: relative;
    z-index: 100;
    backdrop-filter: blur(20px);
    background: rgba(0, 0, 0, 0.8);
    border-bottom: 1px solid var(--border);
    transition: background-color 0.5s ease, border-color 0.5s ease;
}

body.light-theme header {
    background: rgba(255, 255, 255, 0.8);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color), #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

nav a {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

nav a:hover {
    color: var(--primary-color);
}

nav a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: var(--transition);
}

nav a:hover::after {
    width: 100%;
}

/* Переключатель темы */
.theme-toggle {
    position: relative;
    width: 60px;
    height: 30px;
    background: var(--surface-light);
    border: 2px solid var(--border);
    border-radius: 15px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    padding: 0 4px;
}

.theme-toggle:hover {
    border-color: var(--primary-color);
}

.theme-toggle-slider {
    position: absolute;
    width: 22px;
    height: 22px;
    background: var(--primary-color);
    border-radius: 50%;
    transition: transform 0.3s ease, background-color 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

body.light-theme .theme-toggle-slider {
    transform: translateX(30px);
}

.theme-toggle-icon {
    font-size: 14px;
}

.theme-toggle:active .theme-toggle-slider {
    transform: scale(0.95);
}

body.light-theme .theme-toggle:active .theme-toggle-slider {
    transform: translateX(30px) scale(0.95);
}

/* Кнопки */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--radius);
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.9rem;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: var(--surface-light);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--surface);
    transform: translateY(-2px);
    border-color: var(--primary-color);
}

/* Главная страница */
.hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    min-height: calc(100vh - 80px);
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.hero-content {
    animation: slideInLeft 1s ease-out;
}

.greeting {
    display: block;
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.name {
    display: block;
    font-size: 3.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color), #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.hero-description {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.7;
}

.cta-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 500px;
}

.btn-wide {
    width: 100%;
}

.social-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.btn-half {
    width: 100%;
}

.donation-button {
    width: 100%;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem;
    transition: var(--transition);
}

.donation-button:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-md);
}

.donation-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    font-weight: 500;
}

.donation-inline {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.address-value-inline {
    font-family: 'Courier New', monospace;
    font-size: 0.8rem;
    color: var(--primary-color);
    background: var(--background);
    border: 1px dashed var(--border);
    border-radius: var(--radius);
    padding: 0.75rem;
    flex: 1;
    word-break: break-all;
    cursor: pointer;
    transition: var(--transition);
}

.address-value-inline:hover {
    background: var(--surface);
    border-color: var(--primary-color);
}

.btn-copy {
    padding: 0.75rem;
    background: var(--primary-color);
    border: none;
    border-radius: var(--radius);
    color: white;
    cursor: pointer;
    transition: var(--transition);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-copy:hover {
    background: var(--primary-hover);
    transform: scale(1.05);
}

.hero-visual {
    display: flex;
    justify-content: center;
    animation: slideInRight 1s ease-out;
}

.floating-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    padding: 1.5rem;
    max-width: 400px;
    animation: float-gentle 6s ease-in-out infinite;
    position: relative;
    overflow: hidden;
}

.floating-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(139, 92, 246, 0.1), transparent);
    animation: shimmer 3s ease-in-out infinite;
}

.card-header {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.traffic-lights {
    display: flex;
    gap: 0.5rem;
}

.light {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.light.red { background: #ef4444; }
.light.yellow { background: #f59e0b; }
.light.green { background: #22c55e; }

.code-line {
    font-family: 'Courier New', monospace;
    margin: 0.5rem 0;
    font-size: 0.9rem;
}

.indent {
    padding-left: 1rem;
}

.indent.indent {
    padding-left: 2rem;
}

.keyword { color: #c084fc; font-weight: 600; }
.variable { color: #60a5fa; }
.property { color: #f87171; }
.string { color: #34d399; }
.array { color: #fbbf24; }

/* Info Section */
.info-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 4rem;
    padding: 0 2rem;
    animation: slideInUp 1s ease-out 0.3s both;
}

.info-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 2rem;
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
}

.info-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-color);
}

.info-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.social-links {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.social-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--surface-light);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-primary);
    text-decoration: none;
    transition: var(--transition);
    font-weight: 500;
}

.social-link:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    transform: translateX(5px);
}

.social-link svg {
    flex-shrink: 0;
}

.donation {
    background: linear-gradient(135deg, var(--surface) 0%, rgba(139, 92, 246, 0.1) 100%);
}

.donation p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.donation-address {
    background: var(--surface-light);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem;
    margin-top: 1rem;
}

.address-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.address-value {
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
    color: var(--primary-color);
    word-break: break-all;
    padding: 0.75rem;
    background: var(--background);
    border: 1px dashed var(--border);
    border-radius: var(--radius);
    margin-bottom: 1rem;
    cursor: pointer;
    transition: var(--transition);
}

.address-value:hover {
    background: var(--surface);
    border-color: var(--primary-color);
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Применяем анимации к элементам */
header {
    animation: slideInDown 0.8s ease-out;
}

.hero-content {
    animation: slideInLeft 1s ease-out 0.2s both;
}

.hero-visual {
    animation: slideInRight 1s ease-out 0.4s both;
}

.cta-buttons .btn-wide {
    animation: fadeInScale 0.6s ease-out 0.6s both;
}

.social-buttons {
    animation: fadeInScale 0.6s ease-out 0.8s both;
}

.donation-button {
    animation: fadeInScale 0.6s ease-out 1s both;
}

.leaderboard-container h2 {
    animation: slideInDown 0.8s ease-out;
}

.leaderboard-stats .stat:nth-child(1) {
    animation: fadeInScale 0.6s ease-out 0.2s both;
}

.leaderboard-stats .stat:nth-child(2) {
    animation: fadeInScale 0.6s ease-out 0.4s both;
}

.leaderboard-stats .stat:nth-child(3) {
    animation: fadeInScale 0.6s ease-out 0.6s both;
}

.leaderboard-table {
    animation: slideInUp 0.8s ease-out 0.8s both;
}

.leaderboard-entry {
    animation: slideInLeft 0.4s ease-out both;
}

.leaderboard-entry:nth-child(1) { animation-delay: 1s; }
.leaderboard-entry:nth-child(2) { animation-delay: 1.1s; }
.leaderboard-entry:nth-child(3) { animation-delay: 1.2s; }
.leaderboard-entry:nth-child(4) { animation-delay: 1.3s; }
.leaderboard-entry:nth-child(5) { animation-delay: 1.4s; }
.leaderboard-entry:nth-child(n+6) { animation-delay: 1.5s; }

.game-header {
    animation: slideInDown 0.8s ease-out;
}

.game-board {
    animation: fadeInScale 0.8s ease-out 0.3s both;
}

.game-controls {
    animation: slideInUp 0.8s ease-out 0.5s both;
}

/* Анимации */
@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes float-gentle {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%) translateY(-100%) rotate(45deg);
    }
    100% {
        transform: translateX(100%) translateY(100%) rotate(45deg);
    }
}

/* Игра */
.game-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
    text-align: center;
}

.game-header {
    margin-bottom: 2rem;
}

.game-header h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--primary-color), #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.game-stats {
    display: flex;
    justify-content: center;
    gap: 2rem;
}

.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    min-width: 120px;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
}

.stat-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.game-board {
    position: relative;
    display: inline-block;
    margin: 2rem 0;
}

#gameCanvas {
    border: 2px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: var(--shadow-lg);
}

.game-over {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--surface);
    border: 2px solid var(--border);
    padding: 2rem;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    text-align: center;
    max-width: 400px;
    width: 90%;
    z-index: 10;
}

.game-over h3 {
    color: var(--error);
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.save-score {
    margin-top: 1.5rem;
}

.save-score h4 {
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.input-group input {
    padding: 0.75rem;
    border: 2px solid var(--border);
    background: var(--surface-light);
    color: var(--text-primary);
    border-radius: var(--radius);
    font-size: 1rem;
    transition: var(--transition);
}

.input-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: var(--surface);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

.input-group input::placeholder {
    color: var(--text-secondary);
}

.input-group input:invalid:not(:placeholder-shown) {
    border-color: var(--error);
}

.input-group input:valid:not(:placeholder-shown) {
    border-color: var(--success);
}

.input-group input[type="email"]:placeholder-shown {
    border-color: var(--border);
}

.buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.game-controls {
    margin-top: 2rem;
}

.game-controls p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

/* Таблица лидеров - Современный дизайн */
.leaderboard-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem;
}

.leaderboard-container h2 {
    text-align: center;
    font-size: 3rem;
    margin-bottom: 2rem;
    background: linear-gradient(135deg, var(--primary-color), #ec4899, #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 800;
    letter-spacing: -1px;
}

.leaderboard-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.leaderboard-stats .stat {
    background: linear-gradient(135deg, var(--surface), var(--surface-light));
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 2rem 1.5rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
}

.leaderboard-stats .stat::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(139, 92, 246, 0.2), transparent);
    transition: left 0.5s;
}

.leaderboard-stats .stat:hover::before {
    left: 100%;
}

.leaderboard-stats .stat:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
    box-shadow: var(--shadow-xl);
}

.leaderboard-stats .stat-number {
    display: block;
    font-size: 3rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-color), #ec4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.leaderboard-stats .stat-label {
    display: block;
    font-size: 0.875rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.leaderboard-table {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-xl);
}

.table-header {
    display: grid;
    grid-template-columns: 80px 1fr 120px 140px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #8b5cf6 100%);
    color: white;
    padding: 1.25rem 1.5rem;
    font-weight: 700;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.table-body {
    max-height: 500px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) var(--surface);
}

.table-body::-webkit-scrollbar {
    width: 8px;
}

.table-body::-webkit-scrollbar-track {
    background: var(--surface);
}

.table-body::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

.table-body::-webkit-scrollbar-thumb:hover {
    background: var(--primary-hover);
}

.leaderboard-entry {
    display: grid;
    grid-template-columns: 80px 1fr 120px 140px;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border);
    transition: var(--transition);
    position: relative;
    background: var(--surface);
}

.leaderboard-entry::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, var(--primary-color), #ec4899);
    transform: scaleY(0);
    transition: transform 0.3s;
}

.leaderboard-entry:hover::before {
    transform: scaleY(1);
}

.leaderboard-entry:hover {
    background: linear-gradient(90deg, rgba(139, 92, 246, 0.1), transparent);
    border-left: 4px solid var(--primary-color);
    padding-left: calc(1.5rem - 4px);
}

.leaderboard-entry:last-child {
    border-bottom: none;
}

.rank {
    font-weight: 600;
    color: var(--primary-color);
}

.name {
    font-weight: 500;
}

.score {
    font-weight: 600;
    text-align: center;
}

.date {
    color: var(--text-secondary);
    font-size: 0.9rem;
    text-align: right;
}

/* Медальки для топ-3 */
.rank {
    font-weight: 800;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.1rem;
}

.rank.medal {
    position: relative;
}

.rank.gold {
    color: #fbbf24;
}

.rank.gold::before { 
    content: '🥇'; 
    font-size: 1.5rem;
    filter: drop-shadow(0 0 8px rgba(251, 191, 36, 0.6));
}

.rank.silver {
    color: #9ca3af;
}

.rank.silver::before { 
    content: '🥈'; 
    font-size: 1.5rem;
    filter: drop-shadow(0 0 8px rgba(156, 163, 175, 0.6));
}

.rank.bronze {
    color: #d97706;
}

.rank.bronze::before { 
    content: '🥉'; 
    font-size: 1.5rem;
    filter: drop-shadow(0 0 8px rgba(217, 119, 6, 0.6));
}

.leaderboard-entry .name {
    font-weight: 600;
    color: var(--text-primary);
}

.leaderboard-entry .score {
    font-weight: 700;
    color: var(--primary-color);
    font-size: 1.1rem;
}

.leaderboard-entry .date {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* Интерактивная лампочка с физикой */
.light-bulb {
    position: fixed;
    width: 60px;
    height: 60px;
    pointer-events: none;
    z-index: 9999;
    filter: drop-shadow(0 0 20px rgba(251, 191, 36, 0.8));
    will-change: transform;
}

/* Провод для лампочки - SVG линия от верха страницы */
.light-bulb-wire {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9998;
}

.light-bulb-wire svg {
    width: 100%;
    height: 100%;
}

.light-bulb-wire path {
    stroke: rgba(100, 100, 100, 0.5);
    stroke-width: 2;
    fill: none;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
}

.light-bulb-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    background: radial-gradient(circle, rgba(251, 191, 36, 0.6) 0%, rgba(251, 191, 36, 0.3) 40%, transparent 70%);
    border-radius: 50%;
    animation: bulbPulse 3s ease-in-out infinite;
}

.light-bulb-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2.5rem;
    animation: bulbSwing 4s ease-in-out infinite;
}

.light-bulb-trail {
    position: absolute;
    width: 100px;
    height: 100px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, rgba(251, 191, 36, 0.3) 0%, transparent 60%);
    border-radius: 50%;
    animation: bulbTrail 1.5s ease-out infinite;
}

@keyframes bulbPulse {
    0%, 100% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
    50% {
        opacity: 0.6;
        transform: translate(-50%, -50%) scale(1.2);
    }
}

@keyframes bulbSwing {
    0%, 100% {
        transform: translate(-50%, -50%) rotate(-5deg);
    }
    50% {
        transform: translate(-50%, -50%) rotate(5deg);
    }
}

@keyframes bulbTrail {
    0% {
        opacity: 0.8;
        transform: translate(-50%, -50%) scale(0.5);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(1.5);
    }
}

/* Адаптивность */
@media (max-width: 768px) {
    nav {
        padding: 1rem;
        flex-direction: column;
        gap: 1rem;
    }
    
    nav ul {
        gap: 1rem;
    }
    
    .hero {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
        padding: 1rem;
    }
    
    .name {
        font-size: 2.5rem;
    }
    
    .cta-buttons {
        justify-content: center;
        max-width: 100%;
    }
    
    .social-buttons {
        grid-template-columns: 1fr;
    }
    
    .donation-inline {
        flex-direction: column;
    }
    
    .address-value-inline {
        font-size: 0.7rem;
        padding: 0.5rem;
    }
    
    .btn-copy {
        width: 100%;
    }
    
    .floating-card {
        max-width: 300px;
    }
    
    .game-container,
    .leaderboard-container {
        padding: 1rem;
    }
    
    #gameCanvas {
        width: 300px;
        height: 300px;
    }
    
    .game-stats {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }
    
    .leaderboard-stats {
        grid-template-columns: 1fr;
    }
    
    .leaderboard-container h2 {
        font-size: 2rem;
    }
    
    .table-header,
    .leaderboard-entry {
        grid-template-columns: 60px 1fr 80px 100px;
        font-size: 0.85rem;
        padding: 1rem;
    }
    
    .rank {
        font-size: 0.9rem;
    }
    
    .rank.gold::before,
    .rank.silver::before,
    .rank.bronze::before {
        font-size: 1.2rem;
    }
    
    .light-bulb {
        width: 50px;
        height: 50px;
    }
    
    .light-bulb-icon {
        font-size: 2rem;
    }
    
    .buttons {
        flex-direction: column;
    }
}

/* Интерактивная лампочка */
.light-bulb {
    position: fixed;
    width: 60px;
    height: 60px;
    pointer-events: none;
    z-index: 9999;
    filter: drop-shadow(0 0 20px rgba(251, 191, 36, 0.8));
    will-change: transform;
}

/* Провод для лампочки */
.light-bulb-wire {
    position: absolute;
    top: 0;
    left: 50%;
    width: 2px;
    height: 80px;
    background: linear-gradient(to bottom, rgba(100, 100, 100, 0.6), rgba(100, 100, 100, 0.3));
    transform-origin: top center;
    transform: translateX(-50%);
    z-index: -1;
}

.light-bulb-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    background: radial-gradient(circle, rgba(251, 191, 36, 0.6) 0%, rgba(251, 191, 36, 0.3) 40%, transparent 70%);
    border-radius: 50%;
    animation: bulbPulse 3s ease-in-out infinite;
}

.light-bulb-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2.5rem;
    animation: bulbSwing 4s ease-in-out infinite;
}

.light-bulb-trail {
    position: absolute;
    width: 100px;
    height: 100px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, rgba(251, 191, 36, 0.2) 0%, transparent 60%);
    border-radius: 50%;
    animation: bulbTrail 2s ease-out infinite;
}

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

@keyframes bulbSwing {
    0%, 100% {
        transform: translate(-50%, -50%) rotate(-3deg);
    }
    50% {
        transform: translate(-50%, -50%) rotate(3deg);
    }
}

@keyframes bulbTrail {
    0% {
        opacity: 0.6;
        transform: translate(-50%, -50%) scale(0.8);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(1.3);
    }
}

.light-bulb.bouncing {
    animation: bulbBounce 0.3s ease-out;
}

@keyframes bulbBounce {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
    }
}

/* Прелоадер */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(139, 92, 246, 0.3);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Скроллбар для темной темы */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--surface);
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

/* Выделение текста */
::selection {
    background: var(--primary-color);
    color: white;
}

::-moz-selection {
    background: var(--primary-color);
    color: white;
}

/* Анимации для уведомлений копирования */
@keyframes slideInFromRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutToRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* Стили для кнопок копирования */
.btn-copy {
    transition: all 0.3s ease;
}

.btn-copy:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

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