:root {
    --bg-color: #0d1117;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --surface-glass: rgba(255, 255, 255, 0.03);
    --surface-glass-hover: rgba(255, 255, 255, 0.08);
    --border-light: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(255, 255, 255, 0.2);
    --primary: #8b5cf6;
    --secondary: #3b82f6;
    --accent: #ec4899;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    position: relative;
}

/* Background Animated Shapes */
.bg-shapes {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.5;
    animation: drift 20s infinite alternate ease-in-out;
}

.shape-1 {
    width: 400px;
    height: 400px;
    background: var(--primary);
    top: -10%;
    left: -10%;
}

.shape-2 {
    width: 500px;
    height: 500px;
    background: var(--secondary);
    bottom: -15%;
    right: -10%;
    animation-delay: -5s;
    animation-duration: 25s;
}

.shape-3 {
    width: 300px;
    height: 300px;
    background: var(--accent);
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: -10s;
    animation-duration: 30s;
}

@keyframes drift {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(50px, 30px) scale(1.1); }
    100% { transform: translate(-30px, 80px) scale(0.9); }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.header {
    text-align: center;
    margin-top: 2rem;
    animation: fadeInDown 0.8s ease-out;
}

.header h1 {
    font-size: 3.5rem;
    font-weight: 700;
    letter-spacing: -1px;
    background: linear-gradient(135deg, #fff, var(--text-muted));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
}

.header p {
    font-size: 1.2rem;
    color: var(--text-muted);
}

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Clocks Grid */
.live-clocks {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
}

.clock-card {
    background: var(--surface-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-light);
    border-radius: 24px;
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    animation: fadeInUp 0.8s ease-out backwards;
}

.clock-card:nth-child(1) { animation-delay: 0.1s; }
.clock-card:nth-child(2) { animation-delay: 0.2s; }
.clock-card:nth-child(3) { animation-delay: 0.3s; }
.clock-card:nth-child(4) { animation-delay: 0.4s; }
.clock-card:nth-child(5) { animation-delay: 0.5s; }

.clock-card:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: var(--border-hover);
    background: var(--surface-glass-hover);
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.card-header .flag {
    font-size: 1.8rem;
    line-height: 1;
}

.card-header h2 {
    font-size: 1.4rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.time-display {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 0.25rem;
    margin-bottom: 0.5rem;
}

.time {
    font-size: 3.5rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    letter-spacing: -2px;
}

.am-pm {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--primary);
}

.date {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.offset {
    font-size: 0.9rem;
    padding: 0.25rem 0.75rem;
    background: rgba(255,255,255,0.05);
    border-radius: 999px;
    color: var(--text-muted);
    margin-top: auto;
}

/* Meeting Planner section */
.meeting-planner {
    margin-top: 2rem;
    animation: fadeInUp 0.8s ease-out 0.6s backwards;
}

.planner-glass {
    background: linear-gradient(135deg, rgba(255,255,255,0.05), rgba(255,255,255,0.01));
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--border-light);
    border-radius: 24px;
    padding: 2.5rem;
}

.planner-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.planner-header h3 {
    font-size: 1.8rem;
    font-weight: 600;
}

.planner-header .material-icons-rounded {
    color: var(--accent);
    font-size: 2rem;
}

.planner-desc {
    color: var(--text-muted);
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.planner-controls {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
    min-width: 200px;
}

.input-group label {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.input-group select,
.input-group input {
    width: 100%;
    padding: 1rem;
    background: rgba(0,0,0,0.2);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    color: var(--text-main);
    font-family: 'Outfit', sans-serif;
    font-size: 1.1rem;
    outline: none;
    transition: all 0.3s ease;
    cursor: pointer;
}

.input-group select:focus,
.input-group input:focus {
    border-color: var(--primary);
    background: rgba(0,0,0,0.4);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.2);
}

.input-group input[type="time"]::-webkit-calendar-picker-indicator {
    filter: invert(1);
    cursor: pointer;
}

/* Calculated Times Display */
.calculated-times {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    border-top: 1px solid var(--border-light);
    padding-top: 2rem;
}

.calc-card {
    background: rgba(0,0,0,0.2);
    border-radius: 16px;
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: background 0.3s ease;
}

.calc-card:hover {
    background: rgba(0,0,0,0.4);
}

.calc-flag {
    font-size: 2rem;
    line-height: 1;
}

.calc-details {
    display: flex;
    flex-direction: column;
}

.calc-country {
    font-size: 0.9rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.calc-time {
    font-size: 1.4rem;
    font-weight: 600;
}

.calc-date {
    font-size: 0.85rem;
    color: var(--primary);
}

.footer {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: auto;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 768px) {
    .header h1 {
        font-size: 2.5rem;
    }
    .planner-glass {
        padding: 1.5rem;
    }
    .planner-controls {
        flex-direction: column;
    }
}
