/* ===== БАЗА ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --color-bg: #2B2B2B;
    --color-primary: #DC143C;
    --color-primary-dark: #8B0000;
    --color-gold: #FFD700;
    --color-text: #FFFFFF;
    --color-text-dim: #CCCCCC;
    --color-success: #00FF00;
    --color-warning: #FFA500;
    
    --font-main: 'Arial Black', 'Arial Bold', sans-serif;
    --font-secondary: 'Courier New', monospace;
}

body {
    font-family: var(--font-main);
    background: var(--color-bg);
    color: var(--color-text);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* ===== ПАРАЛАКС ФОН ===== */
#parallax-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    background: var(--color-bg);
}

.floryk-pattern {
    position: absolute;
    width: 100%;
    height: 100%;
}

.floryk-item {
    position: absolute;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    opacity: 0.15;
    filter: grayscale(20%);
    transition: all 0.3s ease;
    pointer-events: none;
}

/* Паралакс рух при тестуванні */
body.testing .floryk-item {
    animation: parallaxFloat 6s ease-in-out infinite;
}

@keyframes parallaxFloat {
    0%, 100% { transform: translateX(0) translateY(0); }
    25% { transform: translateX(50px) translateY(-20px); }
    50% { transform: translateX(0) translateY(-40px); }
    75% { transform: translateX(-50px) translateY(-20px); }
}

/* Різні швидкості для різних флорків */
.floryk-item:nth-child(2n) {
    animation-duration: 8s;
    animation-delay: 0.5s;
}

.floryk-item:nth-child(3n) {
    animation-duration: 10s;
    animation-delay: 1s;
}

/* ===== ОСНОВНИЙ КОНТЕЙНЕР ===== */
#main-container {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
    z-index: 10;
}

.screen {
    display: none;
    width: 100%;
    max-width: 900px;
    animation: fadeIn 0.5s ease;
}

.screen.active {
    display: flex;
    flex-direction: column;
    align-items: center;
}

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

/* ===== ПОЧАТКОВИЙ ЕКРАН ===== */
.main-header {
    text-align: center;
    margin-bottom: 60px;
}

.epic-title {
    font-size: clamp(1.2rem, 3vw, 2rem);
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 2px;
    line-height: 1.4;
    text-shadow: 
        2px 2px 0 var(--color-primary),
        4px 4px 0 var(--color-primary-dark),
        6px 6px 20px rgba(220, 20, 60, 0.5);
    color: var(--color-text);
}

.epic-title sup {
    font-size: 0.5em;
    color: var(--color-gold);
}

.button-container {
    text-align: center;
}

.big-red-button {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    color: var(--color-text);
    font-family: var(--font-main);
    font-size: clamp(1.8rem, 5vw, 3rem);
    font-weight: 900;
    padding: 30px 60px;
    border: 5px solid var(--color-gold);
    border-radius: 20px;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 3px;
    box-shadow: 
        0 10px 30px rgba(220, 20, 60, 0.6),
        inset 0 -5px 20px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    animation: pulse 2s ease-in-out infinite;
    position: relative;
    overflow: hidden;
}

.big-red-button::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent,
        rgba(255, 255, 255, 0.1),
        transparent
    );
    transform: rotate(45deg);
    animation: shine 3s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { 
        transform: scale(1); 
        box-shadow: 0 10px 30px rgba(220, 20, 60, 0.6); 
    }
    50% { 
        transform: scale(1.05); 
        box-shadow: 0 15px 50px rgba(220, 20, 60, 0.9); 
    }
}

@keyframes shine {
    0% { left: -50%; }
    100% { left: 150%; }
}

.big-red-button:hover {
    transform: scale(1.1) rotate(-2deg);
    box-shadow: 0 20px 60px rgba(220, 20, 60, 1);
}

.big-red-button:active {
    transform: scale(0.95);
    box-shadow: 0 5px 15px rgba(220, 20, 60, 0.8);
}

.domain-label {
    margin-top: 30px;
    font-family: var(--font-secondary);
    font-size: 1.2rem;
    color: var(--color-text-dim);
    letter-spacing: 2px;
}

/* ===== ФУТЕР ===== */
.page-footer {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
}

.inspiration {
    font-size: 0.9rem;
    color: var(--color-text-dim);
    font-family: var(--font-secondary);
}

.btc-address {
    color: var(--color-gold);
    font-weight: bold;
    word-break: break-all;
    display: inline-block;
    max-width: 400px;
}

/* ===== ЕКРАН ТЕСТУВАННЯ ===== */
.test-header {
    text-align: center;
    margin-bottom: 40px;
}

.test-title {
    font-size: 2rem;
    color: var(--color-gold);
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
    animation: blink 1.5s ease-in-out infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.speed-gauges {
    width: 100%;
    margin-bottom: 40px;
}

.gauge {
    margin-bottom: 30px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.gauge-label {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 15px;
    color: var(--color-gold);
}

.progress-container {
    margin: 15px 0;
}

.progress-bar {
    width: 100%;
    height: 40px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 20px;
    overflow: hidden;
    border: 2px solid var(--color-gold);
}

.progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, 
        var(--color-primary) 0%, 
        var(--color-gold) 50%,
        var(--color-success) 100%
    );
    border-radius: 20px;
    transition: width 0.3s ease;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.8);
}

.speed-value {
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--color-success);
    text-shadow: 0 0 10px rgba(0, 255, 0, 0.5);
    font-family: var(--font-secondary);
}

.test-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    width: 100%;
}

.info-item {
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-family: var(--font-secondary);
    font-size: 0.9rem;
}

.info-icon {
    font-size: 1.2rem;
    margin-right: 5px;
}

.info-label {
    color: var(--color-text-dim);
    margin-right: 5px;
}

.info-value {
    color: var(--color-gold);
    font-weight: bold;
}

/* ===== ЕКРАН РЕЗУЛЬТАТІВ ===== */
.results-header {
    text-align: center;
    margin-bottom: 40px;
}

.results-title {
    font-size: 2.5rem;
    color: var(--color-gold);
    text-shadow: 0 0 30px rgba(255, 215, 0, 0.8);
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    width: 100%;
    margin-bottom: 40px;
}

.result-item {
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    border: 2px solid var(--color-gold);
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.result-item.big {
    grid-column: span 2;
    padding: 30px;
}

.result-icon {
    font-size: 2rem;
}

.result-label {
    font-size: 0.9rem;
    color: var(--color-text-dim);
    text-transform: uppercase;
}

.result-value {
    font-size: 2rem;
    font-weight: 900;
    color: var(--color-success);
    text-shadow: 0 0 10px rgba(0, 255, 0, 0.5);
    font-family: var(--font-secondary);
}

.result-item.big .result-value {
    font-size: 3rem;
}

.results-details {
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    margin-bottom: 30px;
    font-family: var(--font-secondary);
}

.results-details p {
    margin: 10px 0;
    font-size: 1rem;
}

.results-details span {
    color: var(--color-gold);
    font-weight: bold;
}

.results-actions {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.action-button {
    padding: 15px 40px;
    font-size: 1.2rem;
    font-weight: bold;
    border: 3px solid;
    border-radius: 10px;
    cursor: pointer;
    font-family: var(--font-main);
    text-transform: uppercase;
    transition: all 0.3s ease;
}

.action-button.primary {
    background: var(--color-primary);
    border-color: var(--color-gold);
    color: var(--color-text);
}

.action-button.secondary {
    background: transparent;
    border-color: var(--color-gold);
    color: var(--color-gold);
}

.action-button:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 30px rgba(255, 215, 0, 0.5);
}

/* ===== LOADING ===== */
#loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

#loading-overlay.hidden {
    display: none;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 5px solid rgba(255, 215, 0, 0.3);
    border-top-color: var(--color-gold);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .epic-title {
        font-size: 1rem;
        letter-spacing: 1px;
    }
    
    .big-red-button {
        font-size: 1.5rem;
        padding: 20px 40px;
    }
    
    .results-grid {
        grid-template-columns: 1fr;
    }
    
    .result-item.big {
        grid-column: span 1;
    }
    
    .btc-address {
        max-width: 250px;
        font-size: 0.7rem;
    }
}

/* ===== ACCESSIBILITY ===== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
