/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Anthropic-inspired Design System */
    --primary-color: #D97757;        /* Coral/orange - main actions */
    --secondary-color: #7C4DFF;      /* Purple - accents */
    --bg-color: #F5F3EF;            /* Warm beige - main background */
    --surface-color: #FFFFFF;        /* White - cards, containers */
    --text-color: #1F1A16;          /* Dark brown - primary text */
    --text-secondary: #6B6460;       /* Medium brown - secondary text */
    --border-color: #E0DDD9;        /* Light brown - borders */
    --success-color: #2ECC71;        /* Green - success states */
    --warning-color: #F39C12;        /* Orange - warnings */
    --error-color: #E74C3C;          /* Red - errors */
    
    /* Shadows */
    --shadow: 0 1px 3px rgba(31, 26, 22, 0.08);
    --shadow-md: 0 4px 6px rgba(31, 26, 22, 0.1);
    --shadow-lg: 0 10px 25px rgba(31, 26, 22, 0.12);
}

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
header {
    text-align: center;
    padding: 2.5rem 1rem;
    background: var(--primary-color);
    color: white;
    box-shadow: var(--shadow-md);
}

header h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.subtitle {
    font-size: 1rem;
    opacity: 0.9;
}

/* Main Content */
main {
    flex: 1;
    padding: 2rem 1rem;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 2rem;
}

#app-content {
    background: var(--surface-color);
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
}

/* Form Elements */
input[type="text"],
input[type="number"],
input[type="email"],
input[type="date"],
textarea,
select {
    width: 100%;
    padding: 0.75rem 1rem;
    margin: 0.5rem 0;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    font-size: 1rem;
    background-color: var(--surface-color);
    color: var(--text-color);
    transition: all 0.2s ease;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(217, 119, 87, 0.1);
}

label {
    display: block;
    margin: 1.5rem 0 0.5rem;
    font-weight: 600;
    color: var(--text-color);
    font-size: 0.95rem;
}

button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 1rem;
    box-shadow: var(--shadow);
}

button:hover {
    background-color: #c76847;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

button:active {
    transform: translateY(0);
    box-shadow: var(--shadow);
}

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Results Display */
.result {
    margin-top: 2rem;
    padding: 1.5rem;
    background-color: #fef7f4;
    border-left: 4px solid var(--primary-color);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.result h2 {
    color: var(--text-color);
    margin-bottom: 1rem;
    font-weight: 600;
}

.result-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin: 0.5rem 0;
}

.result.success {
    background-color: #f0fdf4;
    border-left-color: var(--success-color);
}

.result.success .result-value {
    color: var(--success-color);
}

.result.warning {
    background-color: #fff7ed;
    border-left-color: var(--warning-color);
}

.result.warning .result-value {
    color: var(--warning-color);
}

.result.error {
    background-color: #fef2f2;
    border-left-color: var(--error-color);
}

.result.error .result-value {
    color: var(--error-color);
}

/* Sidebar */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Ad Containers */
.ad-container {
    background-color: #faf9f7;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.ad-header {
    margin: 0 auto 1rem;
    max-width: 728px;
    height: 90px;
}

.ad-sidebar {
    width: 100%;
    min-height: 250px;
    position: sticky;
    top: 1rem;
}

.ad-placeholder {
    color: var(--text-secondary);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 500;
}

/* Footer */
footer {
    background-color: var(--surface-color);
    border-top: 1px solid var(--border-color);
    padding: 2rem 1rem;
    margin-top: 3rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.footer-links {
    margin-top: 1rem;
    display: flex;
    gap: 2rem;
    justify-content: center;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: var(--primary-color);
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }

.hidden {
    display: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        order: -1;
    }
    
    .ad-sidebar {
        position: static;
        min-height: 200px;
    }
    
    #app-content {
        padding: 1.5rem;
    }
    
    header h1 {
        font-size: 1.5rem;
    }
}

/* Loading State */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.3s ease-in;
}
