/* Futuristic Birthday Website for Slava */
:root {
    --primary-color: #0cf;
    --secondary-color: #f0c;
    --accent-color: #fc0;
    --dark-bg: #111;
    --darker-bg: #050505;
    --text-color: #fff;
    --glow-color: rgba(12, 204, 255, 0.8);
    --hologram-color: rgba(0, 255, 255, 0.5);
}

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

body {
    font-family: 'Roboto', sans-serif;
    background-color: var(--darker-bg);
    color: var(--text-color);
    overflow-x: hidden;
    min-height: 100vh;
    position: relative;
}

/* Background Effects */
.stars, .twinkling, .cosmic-rays {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -10;
}

.stars {
    background: #000 url('https://i.imgur.com/YKY28eT.png') repeat top center;
}

.twinkling {
    background: transparent url('https://i.imgur.com/XYMF4ca.png') repeat top center;
    animation: move-twink-back 200s linear infinite;
    opacity: 0.5;
}

.cosmic-rays {
    background: linear-gradient(125deg, transparent 0%, rgba(12, 204, 255, 0.05) 30%, transparent 50%, rgba(255, 0, 204, 0.05) 70%, transparent 100%);
    animation: cosmic-pulse 15s ease infinite;
}

@keyframes move-twink-back {
    from {background-position: 0 0;}
    to {background-position: -10000px 5000px;}
}

@keyframes cosmic-pulse {
    0%, 100% { opacity: 0.2; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.2); }
}

/* Container */
.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem;
    position: relative;
    z-index: 1;
}

/* Hologram Title Effect */
.hologram-effect {
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
}

.glitch-text {
    font-family: 'Orbitron', sans-serif;
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary-color);
    text-shadow: 0 0 10px var(--glow-color), 0 0 20px var(--glow-color), 0 0 30px var(--glow-color);
    position: relative;
    animation: glitch 5s infinite;
}

.glitch-text::before,
.glitch-text::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.8;
}

.glitch-text::before {
    color: var(--secondary-color);
    z-index: -1;
    animation: glitch-anim 3s infinite;
}

.glitch-text::after {
    color: var(--accent-color);
    z-index: -2;
    animation: glitch-anim2 2.5s infinite;
}

@keyframes glitch-anim {
    0%, 100% { transform: translate(0); }
    20% { transform: translate(-5px, 5px); }
    40% { transform: translate(-5px, -5px); }
    60% { transform: translate(5px, 5px); }
    80% { transform: translate(5px, -5px); }
}

@keyframes glitch-anim2 {
    0%, 100% { transform: translate(0); }
    25% { transform: translate(5px, 0); }
    50% { transform: translate(-5px, 0); }
    75% { transform: translate(0, 5px); }
}

@keyframes glitch {
    0%, 100% { opacity: 1; }
    7% { opacity: 0.75; }
    8% { opacity: 1; }
    9% { opacity: 0.75; }
    10% { opacity: 1; }
    27% { opacity: 1; }
    30% { opacity: 0.75; }
    35% { opacity: 1; }
    52% { opacity: 1; }
    55% { opacity: 0.75; }
    60% { opacity: 1; }
    67% { opacity: 1; }
    69% { opacity: 0.75; }
    72% { opacity: 1; }
}

/* Age Display */
.age-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 1rem;
}

.age-number {
    font-family: 'Orbitron', sans-serif;
    font-size: 2.5rem;
    color: var(--accent-color);
    text-shadow: 0 0 10px rgba(255, 204, 0, 0.8);
}

.binary {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.8rem;
    color: var(--primary-color);
    letter-spacing: 3px;
    margin-top: 0.5rem;
    opacity: 0.8;
}

/* Card */
.card {
    perspective: 1500px;
    width: 100%;
    max-width: 800px;
    height: 780px;
    margin: 0 auto 3rem;
}

.card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.8s;
    transform-style: preserve-3d;
    cursor: pointer;
}

.card:hover .card-inner {
    transform: rotateY(180deg);
}

.card-front, .card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 15px;
    overflow: hidden;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.card-front {
    background: linear-gradient(145deg, #1a1a1a, #0a0a0a);
    border: 1px solid rgba(12, 204, 255, 0.3);
    box-shadow: 0 0 20px rgba(12, 204, 255, 0.2);
}

.card-back {
    background: linear-gradient(145deg, #0a0a0a, #1a1a1a);
    border: 1px solid rgba(255, 0, 204, 0.3);
    transform: rotateY(180deg);
    box-shadow: 0 0 20px rgba(255, 0, 204, 0.2);
    overflow: hidden;
    padding-top: 30px;
}

/* Добавим специальный стиль для отображения card-back без ховера */
.show-card-back .card-inner {
    transform: rotateY(180deg);
}

/* Card Front */
.holographic-badge {
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, rgba(12, 204, 255, 0.2), rgba(255, 0, 204, 0.2));
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 2rem;
    position: relative;
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.holographic-badge i {
    font-size: 4rem;
    color: var(--primary-color);
    animation: float 3s ease-in-out infinite;
}

.scan-line {
    position: absolute;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
    top: 50%;
    animation: scan 3s linear infinite;
}

.subtitle {
    font-family: 'Orbitron', sans-serif;
    color: var(--accent-color);
    margin-top: 2rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    animation: pulse 2s infinite;
}

@keyframes scan {
    0%, 100% { top: 0; opacity: 0; }
    25%, 75% { opacity: 0.8; }
    50% { top: 100%; opacity: 0; }
}

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

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Card Back - Profile */
.profile {
    display: flex;
    align-items: center;
    width: 100%;
    margin-top: 1rem;
    margin-bottom: 2rem;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    border: 1px solid rgba(12, 204, 255, 0.2);
}

.avatar-container {
    position: relative;
    width: 100px;
    height: 100px;
    margin-right: 2rem;
}

.avatar-hologram {
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, var(--hologram-color), transparent 70%);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.avatar-hologram i {
    font-size: 3rem;
    color: var(--text-color);
}

.avatar-ring {
    position: absolute;
    top: -5px;
    left: -5px;
    width: calc(100% + 10px);
    height: calc(100% + 10px);
    border: 2px solid var(--primary-color);
    border-radius: 50%;
    animation: rotate 10s linear infinite;
}

.avatar-ring::before {
    content: '';
    position: absolute;
    top: -2px;
    left: 50%;
    width: 10px;
    height: 10px;
    background-color: var(--primary-color);
    border-radius: 50%;
    transform: translateX(-50%);
}

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

.profile-data {
    flex: 1;
}

.data-item {
    margin-bottom: 0.5rem;
    display: flex;
}

.label {
    font-family: 'Orbitron', sans-serif;
    color: var(--primary-color);
    margin-right: 0.5rem;
    font-size: 0.9rem;
}

.value {
    color: var(--text-color);
    font-weight: 300;
}

/* Message */
.message-container {
    width: 100%;
    margin-bottom: 2rem;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    border: 1px solid rgba(255, 0, 204, 0.2);
}

.message-header {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.message-header i {
    color: var(--secondary-color);
    margin-right: 0.5rem;
    font-size: 1.2rem;
}

.message-header h3 {
    font-family: 'Orbitron', sans-serif;
    color: var(--secondary-color);
}

.message-body p {
    margin-bottom: 0.8rem;
    line-height: 1.6;
}

/* Wishes */
.wishes-container {
    width: 100%;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    border: 1px solid rgba(255, 204, 0, 0.2);
}

.wishes-title {
    font-family: 'Orbitron', sans-serif;
    color: var(--accent-color);
    margin-bottom: 1rem;
    text-align: center;
}

.wishes-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.wish-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.wish-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(12, 204, 255, 0.3);
}

.wish-icon {
    font-size: 1.5rem;
    color: var(--accent-color);
    margin-bottom: 0.5rem;
}

.wish-text {
    font-size: 0.9rem;
}

/* Fireworks */
.fireworks-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}

.firework {
    position: absolute;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    box-shadow: 0 0 10px var(--primary-color), 0 0 20px var(--secondary-color), 0 0 30px var(--accent-color);
    animation: firework 2s ease-out infinite;
}

.firework:nth-child(1) {
    top: 20%;
    left: 20%;
    animation-delay: 0s;
}

.firework:nth-child(2) {
    top: 15%;
    right: 20%;
    animation-delay: 0.5s;
}

.firework:nth-child(3) {
    top: 30%;
    left: 50%;
    animation-delay: 1s;
}

@keyframes firework {
    0% { transform: scale(0); opacity: 1; }
    50% { transform: scale(20); opacity: 0.5; }
    100% { transform: scale(40); opacity: 0; }
}

/* Countdown */
.countdown {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 3rem;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 15px;
    padding: 1.5rem;
    border: 1px solid var(--primary-color);
}

.countdown-title {
    font-family: 'Orbitron', sans-serif;
    color: var(--accent-color);
    margin-bottom: 1.5rem;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 0 0 10px rgba(255, 204, 0, 0.5);
}

.countdown-items {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
}

.countdown-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.countdown-value {
    font-family: 'Orbitron', sans-serif;
    font-size: 2rem;
    color: var(--primary-color);
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid var(--primary-color);
    padding: 0.5rem 1rem;
    border-radius: 5px;
    min-width: 70px;
    text-align: center;
}

.countdown-label {
    font-size: 0.8rem;
    color: var(--text-color);
    margin-top: 0.5rem;
}

/* Footer */
.footer {
    text-align: center;
    margin-top: 2rem;
}

.digital-signature {
    margin-top: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.signature-line {
    width: 100px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
    margin-bottom: 0.5rem;
}

.signature-text {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.8rem;
    color: var(--primary-color);
    letter-spacing: 2px;
}

/* Responsive */
@media (max-width: 768px) {
    .glitch-text {
        font-size: 2rem;
    }
    
    .card {
        height: auto;
    }
    
    .card-front, .card-back {
        position: relative;
        height: auto;
    }
    
    .card-back {
        display: block;
        position: relative;
        transform: none;
        margin-top: 20px;
    }
    
    .card:hover .card-inner {
        transform: none;
    }
    
    .card-inner {
        transform: none;
    }
    
    .wishes-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .countdown {
        flex-wrap: wrap;
    }
}
