:root {
    --primary-color: #2C3E50;
    --accent-color: #E74C3C;
    --background-color: #ECF0F1;
    --card-background: #FFFFFF;
    --text-color: #2C3E50;
    --border-radius: 12px;
    --spacing: 20px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
    padding: 2rem;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing);
}

.header {
    margin-bottom: 3rem;
    text-align: center;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.header-left {
    text-align: left;
    flex: 1;
}

.header-right {
    padding-left: 2rem;
}

.header h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #2C3E50, #E74C3C);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 800;
}

.header p {
    font-size: 1.2rem;
    color: #666;
    max-width: 600px;
    margin: 0 auto;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: white;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.user-info span {
    font-weight: 500;
    color: var(--primary-color);
}

.logout-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.logout-btn:hover {
    color: #c0392b;
}

.main-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 2rem;
}

.input-section, .preview-section {
    background: var(--card-background);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.upload-container {
    border: 2px dashed #ccc;
    border-radius: var(--border-radius);
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 1.5rem;
}

.upload-container:hover {
    border-color: var(--accent-color);
    background-color: rgba(231, 76, 60, 0.05);
}

.preview-original {
    margin: 1.5rem 0;
    text-align: center;
}

.preview-original h3, .preview-section h3 {
    margin-bottom: 1rem;
    color: var(--primary-color);
    font-weight: 600;
}

.preview-placeholder {
    border: 2px dashed #ddd;
    border-radius: var(--border-radius);
    padding: 2rem;
    text-align: center;
    color: #666;
}

.preview-placeholder i {
    font-size: 3rem;
    color: #ddd;
    margin-bottom: 1rem;
}

.preview-image {
    max-width: 100%;
    height: auto;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-top: 1rem;
}

.upload-icon {
    font-size: 3rem;
    color: #666;
    margin-bottom: 1rem;
}

.themes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}

.theme-card {
    background: white;
    padding: 1rem;
    border-radius: var(--border-radius);
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.theme-card:hover {
    border-color: var(--accent-color);
    transform: translateY(-2px);
}

.theme-card.selected {
    border-color: var(--accent-color);
    background-color: rgba(231, 76, 60, 0.05);
}

.theme-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.customize-section textarea {
    width: 100%;
    padding: 1rem;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    font-size: 1rem;
    resize: vertical;
    min-height: 100px;
    margin-bottom: 1.5rem;
}

.generate-btn {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, #2C3E50, #E74C3C);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1.1rem;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.generate-btn:hover {
    transform: translateY(-2px);
}

.loading {
    display: none;
    text-align: center;
    margin-top: 2rem;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--accent-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

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

/* Privacy Policy and Terms of Service Styles */
.policy-section, .terms-section {
    margin-bottom: 2.5rem;
}

.policy-section h2, .terms-section h2 {
    color: var(--primary-color);
    font-size: 1.5rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.policy-section p, .terms-section p {
    margin-bottom: 1rem;
    line-height: 1.6;
    color: #4a5568;
}

.policy-section ul, .terms-section ul {
    list-style-type: disc;
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.policy-section li, .terms-section li {
    margin-bottom: 0.5rem;
    color: #4a5568;
}

@media (max-width: 768px) {
    .main-content {
        grid-template-columns: 1fr;
    }
    
    .header h1 {
        font-size: 2.5rem;
    }
    
    .container {
        padding: 0 1rem;
    }
}
