/**
 * GetMyAIPhoto - Common Styles
 * Shared across all pages: theme system, typography, and base styles
 * Note: Google Fonts loaded via <link> in HTML <head> for better performance
 */

/* ===== CSS VARIABLES - THEME SYSTEM ===== */
/* Light theme is the default (:root), dark theme applied via html[data-theme="dark"] */
/* Theme is managed by theme.js which detects system preference or user choice */

:root {
    /* Colors - Light Theme (Default) */
    --bg-main: #ffffff;
    --bg-secondary: #f9fafb;
    --bg-elevated: #ffffff;
    --text-main: #1f2937;
    --text-secondary: #6b7280;
    --border-color: #e5e7eb;
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --accent-glow: rgba(37, 99, 235, 0.1);

    /* Status colors (for admin) */
    --success-color: #10b981;
    --error-color: #ef4444;
    --warning-color: #f59e0b;

    /* Typography */
    --font-heading: 'Noto Serif', Georgia, serif;
    --font-body: 'Noto Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.12);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
    --shadow-lg: 0 10px 30px rgba(0,0,0,0.1);
}

/* Dark Theme Override */
html[data-theme="dark"] {
    --bg-main: #0a0a0a;
    --bg-secondary: #1a1a1a;
    --bg-elevated: #242424;
    --text-main: #e5e5e5;
    --text-secondary: #a3a3a3;
    --border-color: #333333;
    --primary-color: #60a5fa;
    --primary-hover: #3b82f6;
    --accent-glow: rgba(96, 165, 250, 0.15);
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.5);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.4);
    --shadow-lg: 0 10px 30px rgba(0,0,0,0.5);
}

/* ===== GLOBAL STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    color: var(--text-main);
    line-height: 1.6;
    background: var(--bg-secondary);
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--text-main);
}

/* ===== FORM ELEMENTS - INHERIT FONT ===== */
button, input, select, textarea {
    font-family: inherit;
}

/* ===== THEME TOGGLE PILLS ===== */
.theme-toggle-pills {
    display: inline-flex;
    background: var(--bg-elevated);
    border: 2px solid var(--border-color);
    border-radius: 50px;
    padding: 0.25rem;
    gap: 0.25rem;
}

.theme-pill {
    background: transparent;
    border: none;
    border-radius: 50px;
    padding: 0.4rem 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    transition: all 0.2s ease;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.85rem;
    font-family: var(--font-body);
}

.theme-pill:hover {
    color: var(--text-main);
}

.theme-pill.active {
    background: var(--primary-color);
    color: #ffffff;
}

.theme-pill-icon {
    font-size: 1rem;
    line-height: 1;
}

/* ===== LOADING OVERLAY ===== */
#loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    backdrop-filter: blur(8px);
}

#loading-overlay p {
    color: #ffffff;
    font-size: 1.1rem;
    margin-top: 2rem;
    font-weight: 500;
    text-align: center;
    max-width: 80%;
    line-height: 1.5;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255, 255, 255, 0.2);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* ===== TOAST NOTIFICATIONS ===== */
.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    font-weight: 500;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 10000;
    max-width: 400px;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

.toast-success {
    background: var(--success-color);
    color: #ffffff;
}

.toast-error {
    background: var(--error-color);
    color: #ffffff;
}

.toast-warning {
    background: var(--warning-color);
    color: #ffffff;
}

/* ===== FOOTER ===== */
footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 4rem 0 2rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-col h4 {
    color: var(--text-main);
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.footer-col p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
}

.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--primary-color);
}

.legal-text {
    font-size: 0.875rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-secondary);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

/* ===== RESPONSIVE - FOOTER ===== */
@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
}

@media (max-width: 600px) {
    .legal-text {
        flex-direction: column;
        text-align: center;
    }
}
/* Pricing Card Styles */

.pricing-container {
    padding: 2rem 0;
    max-width: 1000px;
    margin: 0 auto;
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.pricing-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    position: relative;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
}

.pricing-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.pricing-card.featured {
    border: 2px solid var(--primary-color);
    background: linear-gradient(to bottom, var(--bg-elevated), rgba(37, 99, 235, 0.05));
}

.popular-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary-color);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.card-header h3 {
    margin: 0;
    font-size: 1.25rem;
    color: var(--text-main);
}

.pricing-amount {
    margin: 1.5rem 0;
}

.price {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-main);
}

.original-price {
    text-decoration: line-through;
    color: var(--text-secondary);
    font-size: 1rem;
    margin-left: 0.5rem;
}

.discount-tag {
    display: inline-block;
    background: #dcfce7;
    color: #166534;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-top: 0.5rem;
}

[data-theme="dark"] .discount-tag {
    background: #064e3b;
    color: #a7f3d0;
}

.features-list {
    list-style: none;
    padding: 0;
    margin: 2rem 0;
    text-align: left;
    flex-grow: 1;
}

.features-list li {
    margin-bottom: 0.75rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
}

.features-list li::before {
    content: "✓";
    color: var(--primary-color);
    font-weight: bold;
    margin-right: 0.5rem;
}

.btn-purchase {
    width: 100%;
    padding: 1rem;
    border-radius: 8px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.2s;
}

.btn-purchase.primary {
    background: var(--primary-color);
    color: white;
}

.btn-purchase.primary:hover {
    background: var(--secondary-color);
}

.btn-purchase.outline {
    background: transparent;
    border: 2px solid var(--border-color);
    color: var(--text-main);
}

.btn-purchase.outline:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* Watermark Preview */
.preview-container {
    position: relative;
    max-width: 200px;
    margin: 0 auto 2rem auto;
}

.preview-container img {
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.preview-label {
    margin-top: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    .pricing-grid {
        grid-template-columns: 1fr;
        max-width: 400px;
        margin: 2rem auto;
    }
}
