/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #000000;
    background-color: #ffffff;
    overflow-x: hidden;
    position: relative;
}

/* Fix mobile white line issues */
body::before,
body::after {
    content: '';
    position: fixed;
    top: 0;
    bottom: 0;
    width: 1px;
    background: #ffffff;
    z-index: 10000;
}

body::before {
    left: -1px;
}

body::after {
    right: -1px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Main Content */
.main-content {
    margin-top: 85px;
    min-height: auto;
    position: relative;
    background: #ffffff;
    width: 100%;
    overflow-x: hidden;
}

/* Legacy styles - replaced by hero.css */

/* Legacy button and features styles - replaced by hero.css */

/* Mobile Styles - Updated for new design */
@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }
    
    /* Ensure touch targets are at least 44px */
    button,
    .cta-primary,
    .cta-secondary,
    .cta-empire,
    .cta-book,
    .story-trigger {
        min-height: 44px;
        min-width: 44px;
        touch-action: manipulation;
    }
    
    /* Improve text readability */
    body {
        font-size: 16px;
        line-height: 1.6;
    }
    
    /* Better spacing for mobile */
    .main-content {
        margin-top: 80px;
    }
}

/* Small mobile devices */
@media (max-width: 480px) {
    .container {
        padding: 0 0.75rem;
    }
    
    body {
        font-size: 15px;
    }
    
    .main-content {
        margin-top: 75px;
    }
}

/* Extra small devices */
@media (max-width: 360px) {
    .container {
        padding: 0 0.5rem;
    }
    
    body {
        font-size: 14px;
        line-height: 1.5;
    }
}

/* Tablet Styles - Updated for new design */
@media (min-width: 769px) and (max-width: 1024px) {
    .container {
        padding: 0 2rem;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Focus styles for keyboard navigation - Updated */
button:focus,
a:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.1);
}

button:focus:not(:focus-visible),
a:focus:not(:focus-visible) {
    box-shadow: none;
}

button:active,
a:active {
    outline: none;
}

/* Print styles */
@media print {
    .header,
    .footer {
        display: none;
    }
    
    .main-content {
        margin-top: 0;
    }
}

/* Achievements Link Styles */
.story-cta {
    margin-top: 2rem;
    text-align: center;
}

.achievements-link {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, #000000 0%, #333333 100%);
    color: #ffffff;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.achievements-link:hover {
    background: linear-gradient(135deg, #333333 0%, #000000 100%);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.achievements-link:active {
    transform: translateY(0);
}

.achievements-text {
    font-size: 0.9rem;
    letter-spacing: 0.5px;
}

.achievements-link i {
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

.achievements-link:hover i {
    transform: translateX(3px);
}

@media (max-width: 768px) {
    .achievements-link {
        padding: 0.875rem 1.5rem;
        font-size: 0.9rem;
    }
    
    .achievements-text {
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .achievements-link {
        padding: 0.75rem 1.25rem;
        font-size: 0.85rem;
    }
    
    .achievements-text {
        font-size: 0.8rem;
    }
}
