/* Global Styles - AI Storybook Generator */

/* CSS Custom Properties - Child-Friendly Theme */
:root {
    --primary-color: #FF6B9D;
    --primary-hover: #FF5085;
    --secondary-color: #FFD93D;
    --accent-color: #6BCF7F;
    --error-color: #FF6B6B;
    --success-color: #6BCF7F;
    --text-color: #4A4A4A;
    --text-secondary: #888888;
    --background-color: #FFF5E6;
    --white: #FFFFFF;
    --border-color: #FFD93D;
    --shadow: 0 4px 12px rgba(255, 107, 157, 0.2);
    --shadow-hover: 0 6px 20px rgba(255, 107, 157, 0.3);
    --gradient-bg: linear-gradient(135deg, #FFF5E6 0%, #FFE8F0 100%);
    --card-bg: linear-gradient(135deg, #FFFFFF 0%, #FFF9E6 100%);
}

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

body {
    font-family: 'PingFang SC', 'Helvetica Neue', Arial, sans-serif;
    font-size: 18px;
    line-height: 1.8;
    color: var(--text-color);
    background: var(--gradient-bg);
    background-attachment: fixed;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    position: relative;
}

/* Container */
.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* Typography */
h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 15px;
    text-align: center;
    text-shadow: 2px 2px 4px rgba(255, 107, 157, 0.2);
    letter-spacing: 1px;
}

h2 {
    font-size: 1.6rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 15px;
    margin-top: 30px;
    display: flex;
    align-items: center;
    gap: 10px;
}

h2::before {
    content: '✨';
    font-size: 1.4rem;
}

.subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 30px;
    line-height: 1.6;
}

/* Button Styles */
.btn-primary {
    display: block;
    width: 100%;
    min-height: 52px;
    padding: 14px 28px;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--white);
    background: linear-gradient(135deg, var(--primary-color) 0%, #FF8AB4 100%);
    border: none;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
    font-family: inherit;
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '🌟 ';
    margin-right: 5px;
}

.btn-primary::after {
    content: ' 🌟';
    margin-left: 5px;
}

.btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, var(--primary-hover) 0%, #FF7BA5 100%);
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px) scale(1.02);
}

.btn-primary:active:not(:disabled) {
    transform: translateY(0) scale(1);
}

.btn-primary:disabled {
    background: linear-gradient(135deg, #CCCCCC 0%, #DDDDDD 100%);
    cursor: not-allowed;
    box-shadow: none;
    opacity: 0.6;
}

.btn-file {
    display: inline-block;
    padding: 12px 24px;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--white);
    background: linear-gradient(135deg, var(--accent-color) 0%, #5ABF6E 100%);
    border: 3px solid var(--white);
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(107, 207, 127, 0.3);
}

.btn-file::before {
    content: '📷 ';
    margin-right: 5px;
}

.btn-file:hover {
    background: linear-gradient(135deg, #5ABF6E 0%, #49AE5D 100%);
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 6px 16px rgba(107, 207, 127, 0.4);
}

/* Error Message Styles */
.error-message {
    padding: 18px 20px;
    margin-top: 20px;
    background: linear-gradient(135deg, #FFE5E5 0%, #FFCCCB 100%);
    color: var(--error-color);
    border: 3px solid var(--error-color);
    border-radius: 15px;
    text-align: center;
    font-weight: 600;
    font-size: 1.05rem;
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.2);
}

.error-message::before {
    content: '⚠️ ';
    margin-right: 8px;
}

/* Loading Indicator */
.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-top: 30px;
}

.loading p {
    margin-top: 15px;
    color: var(--text-secondary);
    font-size: 1rem;
}

/* Spinner Animation */
.spinner {
    width: 60px;
    height: 60px;
    border: 5px solid var(--secondary-color);
    border-top-color: var(--primary-color);
    border-right-color: var(--accent-color);
    border-radius: 50%;
    animation: spin 1s ease-in-out infinite;
    box-shadow: 0 0 20px rgba(255, 107, 157, 0.3);
}

@keyframes spin {
    0% { 
        transform: rotate(0deg);
    }
    100% { 
        transform: rotate(360deg);
    }
}

/* Utility Classes */
.hidden {
    display: none !important;
}

/* Section Styles */
section {
    background: var(--card-bg);
    padding: 30px;
    margin-bottom: 25px;
    border-radius: 20px;
    box-shadow: var(--shadow);
    border: 3px solid var(--border-color);
    transition: all 0.3s ease;
}

section:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

/* Responsive Design - Tablet */
@media (max-width: 1024px) {
    .container {
        padding: 30px 15px;
    }
    
    h1 {
        font-size: 1.75rem;
    }
    
    h2 {
        font-size: 1.25rem;
    }
}

/* Responsive Design - Mobile */
@media (max-width: 768px) {
    .container {
        padding: 20px 10px;
    }
    
    h1 {
        font-size: 1.5rem;
    }
    
    h2 {
        font-size: 1.1rem;
    }
    
    section {
        padding: 20px;
    }
}
