/* ============================================
   Date Converter - Main Styles
   ============================================ */

:root {
    --primary: #667eea;
    --primary-dark: #5a67d8;
    --secondary: #764ba2;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --dark: #1f2937;
    --light: #f8fafc;
    --gray: #6b7280;
    --border: #e5e7eb;
    --shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 2rem 1rem;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
}

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(10px);
    padding: 0.5rem 1.5rem;
    border-radius: 60px;
}

.logo i {
    font-size: 1.5rem;
    color: white;
}

.logo span {
    font-size: 1.2rem;
    font-weight: 600;
    color: white;
}

.session-badge {
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(10px);
    padding: 0.5rem 1.2rem;
    border-radius: 60px;
    color: white;
    font-size: 0.85rem;
}

/* Hero */
.hero {
    text-align: center;
    margin-bottom: 2rem;
}

.hero h1 {
    font-size: 2rem;
    font-weight: 700;
    color: white;
    margin-bottom: 0.5rem;
}

.subtitle {
    color: rgba(255,255,255,0.9);
    font-size: 0.9rem;
}

/* Main Card */
.main-card {
    background: white;
    border-radius: 1.5rem;
    padding: 1.8rem;
    box-shadow: var(--shadow);
    margin-bottom: 1.5rem;
}

/* Converter Sections */
.converter-section {
    background: var(--light);
    border-radius: 1rem;
    padding: 1.2rem;
    margin-bottom: 1rem;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border);
}

.section-header i {
    font-size: 1.2rem;
    color: var(--primary);
}

.section-header h3 {
    font-size: 0.9rem;
    color: var(--dark);
}

.calendar-selector {
    margin-bottom: 1rem;
}

.calendar-select {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid var(--border);
    border-radius: 0.8rem;
    font-size: 0.9rem;
    background: white;
    cursor: pointer;
    transition: all 0.2s;
}

.calendar-select:focus {
    outline: none;
    border-color: var(--primary);
}

.date-fields {
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
}

.date-field {
    flex: 1;
    min-width: 80px;
}

.date-field label {
    display: block;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--gray);
    margin-bottom: 0.3rem;
}

.date-field input, .date-field select {
    width: 100%;
    padding: 0.7rem;
    border: 2px solid var(--border);
    border-radius: 0.6rem;
    font-size: 0.85rem;
    transition: all 0.2s;
}

.date-field input:focus, .date-field select:focus {
    outline: none;
    border-color: var(--primary);
}

/* Swap Button */
.swap-container {
    display: flex;
    justify-content: center;
    margin: -0.5rem 0;
    position: relative;
    z-index: 1;
}

.swap-btn {
    background: white;
    border: 2px solid var(--border);
    border-radius: 2rem;
    padding: 0.5rem 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--primary);
    transition: all 0.2s;
}

.swap-btn:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* Result Section */
.result-section {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border-radius: 1rem;
    padding: 1.2rem;
    margin: 1rem 0;
    color: white;
}

.result-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.8rem;
}

.result-header i {
    font-size: 1rem;
}

.result-header h3 {
    font-size: 0.85rem;
    font-weight: 500;
    opacity: 0.9;
}

.result-date {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0.3rem;
}

.result-weekday {
    font-size: 0.9rem;
    opacity: 0.9;
    margin-bottom: 0.3rem;
}

.result-details {
    font-size: 0.75rem;
    opacity: 0.8;
    font-family: monospace;
}

/* Actions Section */
.actions-section {
    display: flex;
    gap: 0.8rem;
    margin-top: 1rem;
}

.action-btn {
    flex: 1;
    padding: 0.7rem;
    border: 2px solid var(--border);
    background: white;
    border-radius: 0.8rem;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 500;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.action-btn:hover {
    border-color: var(--primary);
    background: var(--light);
    transform: translateY(-2px);
}

/* Info Section */
.info-section {
    background: white;
    border-radius: 1.5rem;
    padding: 1.2rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.info-section h3 {
    font-size: 0.9rem;
    margin-bottom: 1rem;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 0.8rem;
}

.info-card {
    background: var(--light);
    border-radius: 0.8rem;
    padding: 0.8rem;
    border-left: 4px solid var(--primary);
}

.info-card h4 {
    font-size: 0.85rem;
    margin-bottom: 0.3rem;
    color: var(--dark);
}

.info-card p {
    font-size: 0.7rem;
    color: var(--gray);
}

/* Comparison Section */
.comparison-section {
    background: white;
    border-radius: 1.5rem;
    padding: 1.2rem;
    box-shadow: var(--shadow-sm);
}

.comparison-section h3 {
    font-size: 0.9rem;
    margin-bottom: 1rem;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.comparison-table {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.6rem;
}

.comparison-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0.8rem;
    background: var(--light);
    border-radius: 0.6rem;
}

.comparison-label {
    font-size: 0.75rem;
    color: var(--gray);
}

.comparison-value {
    font-weight: 600;
    color: var(--primary);
}

/* Back Link */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    margin-top: 1.5rem;
    font-size: 0.85rem;
}

.back-link:hover {
    color: white;
}

/* Footer */
.footer {
    margin-top: 2rem;
    padding: 1rem 0;
    border-top: 1px solid rgba(255,255,255,0.2);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-links {
    display: flex;
    gap: 1.5rem;
}

.footer-links a {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    font-size: 0.75rem;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: white;
}

.footer-credit {
    color: rgba(255,255,255,0.6);
    font-size: 0.7rem;
}

.footer-credit strong {
    color: white;
}

/* Responsive */
@media (max-width: 700px) {
    .main-card {
        padding: 1rem;
    }
    
    .hero h1 {
        font-size: 1.5rem;
    }
    
    .date-fields {
        flex-direction: column;
    }
    
    .actions-section {
        flex-wrap: wrap;
    }
    
    .result-date {
        font-size: 1.2rem;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
    }
    
    .comparison-table {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
}