/**
 * DarleyGo Theme Additional Styles
 * 
 * @package DarleyGo
 * @version 1.0.0
 */

/* ================================
   MOBILE MENU
   ================================ */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 10, 26, 0.98);
    backdrop-filter: blur(10px);
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mobile-nav-menu {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.mobile-nav-menu a {
    font-size: 1.5rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-secondary);
    transition: color 0.3s ease;
}

.mobile-nav-menu a:hover {
    color: var(--text-primary);
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

body.menu-open {
    overflow: hidden;
}

/* ================================
   HERO CTA BUTTONS
   ================================ */
.hero-cta {
    display: flex;
    gap: var(--spacing-md);
    justify-content: center;
    margin-top: var(--spacing-lg);
    opacity: 0;
    animation: fadeInUp 0.8s ease 0.9s forwards;
}

/* ================================
   CHARACTER ANIMATION
   ================================ */
.welcome-text .char {
    display: inline-block;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.03s ease, transform 0.03s ease;
}

.welcome-text.animate .char {
    opacity: 1;
    transform: translateY(0);
}

/* ================================
   TOKEN CARD LINE ANIMATION
   ================================ */
.token-card {
    position: relative;
    overflow: hidden;
}

.token-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-secondary));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 1s ease;
}

.token-card.line-visible::before {
    transform: scaleX(1);
}

/* ================================
   TEAM SOCIAL LINKS
   ================================ */
.team-social {
    display: flex;
    justify-content: center;
    gap: var(--spacing-sm);
    margin-top: var(--spacing-sm);
}

.team-social a {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    transition: all 0.3s ease;
}

.team-social a:hover {
    background: var(--color-primary);
    transform: translateY(-2px);
}

.team-social svg {
    fill: var(--text-secondary);
    transition: fill 0.3s ease;
}

.team-social a:hover svg {
    fill: var(--text-primary);
}

/* ================================
   ROADMAP STATUS INDICATORS
   ================================ */
.roadmap-node {
    position: relative;
}

.roadmap-node::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    background: var(--color-primary);
    border-radius: 50%;
}

.roadmap-item[data-status="completed"] .roadmap-node {
    background: #22c55e;
}

.roadmap-item[data-status="in_progress"] .roadmap-node {
    background: #f59e0b;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.4);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(245, 158, 11, 0);
    }
}

/* ================================
   SCROLL PROGRESS BAR
   ================================ */
.scroll-progress {
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.5);
}

/* ================================
   HOVER EFFECTS
   ================================ */
.horse-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.horse-card-image img {
    transition: transform 0.3s ease;
}

.horse-card-glow {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* ================================
   GAMEPLAY PANEL TRANSITIONS
   ================================ */
.gameplay-panel {
    display: none;
    opacity: 0;
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.gameplay-panel.active {
    display: grid;
    opacity: 1;
}

/* ================================
   BUTTON HOVER EFFECTS
   ================================ */
.btn {
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

/* ================================
   NAVIGATION ACTIVE STATE
   ================================ */
.nav-link.active {
    color: var(--text-primary);
}

.nav-link.active::after {
    width: 100%;
}

/* ================================
   LOADING STATES
   ================================ */
.loading {
    position: relative;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid transparent;
    border-top-color: var(--color-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* ================================
   CUSTOM SCROLLBAR
   ================================ */
::-webkit-scrollbar {
    width: 8px;
}

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

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--color-primary), var(--color-secondary));
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--color-primary-dark), var(--color-secondary));
}

/* ================================
   SELECTION STYLES
   ================================ */
::selection {
    background: rgba(99, 102, 241, 0.3);
    color: var(--text-primary);
}

::-moz-selection {
    background: rgba(99, 102, 241, 0.3);
    color: var(--text-primary);
}

/* ================================
   FOCUS STYLES
   ================================ */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

/* ================================
   REDUCED MOTION
   ================================ */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    .scroll-progress {
        display: none;
    }
}

/* ================================
   PRINT STYLES
   ================================ */
@media print {
    .header,
    .footer,
    #particles-canvas,
    .scroll-progress,
    .hero-horses,
    .mobile-menu-toggle,
    .btn {
        display: none !important;
    }
    
    .section {
        padding: 2rem 0;
        page-break-inside: avoid;
    }
    
    body {
        background: white;
        color: black;
    }
    
    .hero {
        min-height: auto;
    }
}

/* ================================
   HIGH CONTRAST MODE
   ================================ */
@media (prefers-contrast: high) {
    :root {
        --text-primary: #ffffff;
        --text-secondary: #cccccc;
        --color-primary: #6366f1;
        --color-secondary: #a855f7;
    }
    
    .nav-link::after {
        height: 3px;
    }
    
    .horse-card,
    .token-card,
    .team-card {
        border-width: 2px;
    }
}

/* ================================
   DARK MODE SUPPORT (for future)
   ================================ */
@media (prefers-color-scheme: dark) {
    /* Already dark theme by default */
}

/* ================================
   UTILITY CLASSES
   ================================ */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: var(--spacing-xs); }
.mt-2 { margin-top: var(--spacing-sm); }
.mt-3 { margin-top: var(--spacing-md); }
.mt-4 { margin-top: var(--spacing-lg); }
.mt-5 { margin-top: var(--spacing-xl); }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: var(--spacing-xs); }
.mb-2 { margin-bottom: var(--spacing-sm); }
.mb-3 { margin-bottom: var(--spacing-md); }
.mb-4 { margin-bottom: var(--spacing-lg); }
.mb-5 { margin-bottom: var(--spacing-xl); }

.hidden { display: none !important; }
.invisible { visibility: hidden; }
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ================================
   ANIMATION KEYFRAMES
   ================================ */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

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

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

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

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

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

@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 bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

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

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

@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 5px var(--color-primary);
    }
    50% {
        box-shadow: 0 0 20px var(--color-primary), 0 0 30px var(--color-secondary);
    }
}

/* Animation utility classes */
.animate-fadeIn { animation: fadeIn 0.5s ease forwards; }
.animate-fadeInUp { animation: fadeInUp 0.5s ease forwards; }
.animate-fadeInDown { animation: fadeInDown 0.5s ease forwards; }
.animate-fadeInLeft { animation: fadeInLeft 0.5s ease forwards; }
.animate-fadeInRight { animation: fadeInRight 0.5s ease forwards; }
.animate-scaleIn { animation: scaleIn 0.5s ease forwards; }
.animate-slideInUp { animation: slideInUp 0.5s ease forwards; }
.animate-slideInLeft { animation: slideInLeft 0.5s ease forwards; }
.animate-slideInRight { animation: slideInRight 0.5s ease forwards; }
.animate-bounce { animation: bounce 1s ease infinite; }
.animate-pulse { animation: pulse 2s ease infinite; }
.animate-glow { animation: glow 2s ease infinite; }
.animate-rotate { animation: rotate 2s linear infinite; }

/* Animation delays */
.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }
.delay-400 { animation-delay: 0.4s; }
.delay-500 { animation-delay: 0.5s; }
.delay-600 { animation-delay: 0.6s; }
.delay-700 { animation-delay: 0.7s; }
.delay-800 { animation-delay: 0.8s; }
.delay-900 { animation-delay: 0.9s; }
.delay-1000 { animation-delay: 1s; }
