/* Responsive Styles */

/* Large Devices (desktops, less than 1200px) */
@media (max-width: 1199.98px) {
    .container {
        max-width: 960px;
    }
    
    .hero h2 {
        font-size: 2.5rem;
    }
    
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Medium Devices (tablets, less than 992px) */
@media (max-width: 991.98px) {
    .container {
        max-width: 720px;
    }
    
    h1 {
        font-size: 2.2rem;
    }
    
    h2 {
        font-size: 1.8rem;
    }
    
    .hero {
        padding: 150px 0 80px;
    }
    
    .hero h2 {
        font-size: 2.2rem;
    }
    
    .hero p {
        font-size: 1.1rem;
    }
    
    .form-options {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-content {
        grid-template-columns: 1fr 1fr;
        gap: 40px;
    }
    
    .footer-brand {
        grid-column: span 2;
    }
}

/* Small Devices (landscape phones, less than 768px) */
@media (max-width: 767.98px) {
    .container {
        max-width: 540px;
    }
    
    section {
        padding: 60px 0;
    }
    
    .hamburger {
        display: block;
        z-index: 101;
    }
    
    .nav-links {
        position: fixed;
        right: -100%;
        top: 0;
        width: 70%;
        height: 100vh;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        background-color: white;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
        transition: 0.5s;
        z-index: 100;
        padding: 50px 0;
    }
    
    .nav-links.active {
        right: 0;
    }
    
    .nav-links li {
        margin: 20px 0;
    }
    
    .hamburger.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    
    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }
    
    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
    
    .hero {
        padding: 130px 0 70px;
    }
    
    .hero h2 {
        font-size: 2rem;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .form-options {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
    
    .footer-brand {
        grid-column: span 1;
    }
}

/* Extra Small Devices (phones, less than 576px) */
@media (max-width: 575.98px) {
    h1 {
        font-size: 1.8rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    h3 {
        font-size: 1.3rem;
    }
    
    .hero {
        padding: 120px 0 60px;
    }
    
    .hero h2 {
        font-size: 1.8rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .generator-form, 
    .story-output,
    .about-box,
    .feature-card,
    .accordion-item {
        padding: 20px;
    }
    
    .story-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    .story-actions button {
        width: 100%;
    }
    
    .nav-links {
        width: 80%;
    }
    
    .accordion-header h3 {
        font-size: 1.1rem;
    }
}

/* For print styles - optimize for printing */
@media print {
    header, 
    footer, 
    .hero, 
    .generator-form, 
    .ad-section,
    .story-actions {
        display: none;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.5;
        color: #000;
        background: #fff;
    }
    
    .story-output {
        box-shadow: none;
        border: none;
        padding: 0;
    }
    
    .story-result {
        border: none;
        overflow: visible;
        max-height: none;
    }
    
    a {
        text-decoration: underline;
        color: #000;
    }
    
    h1, h2, h3, h4, h5, h6 {
        page-break-after: avoid;
        page-break-inside: avoid;
    }
    
    img {
        max-width: 100% !important;
        page-break-inside: avoid;
    }
    
    p, h2, h3 {
        orphans: 3;
        widows: 3;
    }
}

/* Focus visible styles for accessibility */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Prefers reduced motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    :root {
        --text-color: #f5f5f5;
        --light-text: #ccc;
        --very-light-text: #aaa;
        --background-color: #121212;
        --light-background: #222;
        --dark-background: #000;
        --border-color: #444;
        --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    }
    
    body {
        color: var(--text-color);
        background-color: var(--background-color);
    }
    
    header {
        background-color: #181818;
    }
    
    .logo a, .nav-links a {
        color: var(--text-color);
    }
    
    .bar {
        background-color: var(--text-color);
    }
    
    .generator-form,
    .story-output,
    .about-box,
    .feature-card,
    .accordion-item,
    .ad-container {
        background-color: #181818;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    }
    
    .form-group textarea, 
    .form-group select {
        background-color: #222;
        color: var(--text-color);
        border-color: var(--border-color);
    }
    
    .story-result {
        border-color: var(--border-color);
        background-color: #222;
    }
    
    .btn-secondary {
        background-color: #333;
        color: var(--text-color);
    }
    
    ::-webkit-scrollbar-track {
        background: #333;
    }
} 