/* Scoped styles for the Timezone Converter App */

:root {
    --tz-bg: rgba(17, 24, 39, 0.7);
    --tz-primary: #0ea5e9;
    --tz-primary-hover: #0284c7;
    --tz-border: rgba(255, 255, 255, 0.1);
}

.app-container {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.main-card {
    background: var(--tz-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--tz-border);
    border-radius: 24px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    display: flex;
    width: 100%;
    max-width: 1000px;
    overflow: hidden;
    min-height: 550px;
    margin-top: 2rem;
}

/* Common Section Styles */
.input-section,
.display-section {
    padding: 2.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Left Section */
.input-section {
    border-right: 1px solid var(--tz-border);
    justify-content: flex-start;
}

.brand {
    margin-bottom: 1.5rem;
}

.brand h1 {
    font-size: 2rem;
    font-weight: 600;
    background: linear-gradient(to right, #38bdf8, #0ea5e9);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.brand p {
    color: #94a3b8;
    font-size: 1rem;
}

.input-group {
    margin-bottom: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.input-group > label {
    font-size: 0.9rem;
    color: #94a3b8;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Select */
select {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--tz-border);
    padding: 0.75rem 1rem;
    border-radius: 12px;
    color: #f8fafc;
    font-size: 0.9rem;
    outline: none;
    transition: all 0.3s ease;
    width: 100%;
    cursor: pointer;
}

select:focus {
    border-color: var(--tz-primary);
    box-shadow: 0 0 0 2px rgba(14, 165, 233, 0.2);
}

select option {
    background: #1e293b;
    color: #f8fafc;
}

/* Date/Time Row */
.datetime-row {
    display: flex;
    gap: 0.5rem;
}

.datetime-row input {
    flex: 1;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--tz-border);
    padding: 0.75rem 0.75rem;
    border-radius: 12px;
    color: #f8fafc;
    font-size: 0.9rem;
    outline: none;
    transition: all 0.3s ease;
}

.datetime-row input:focus {
    border-color: var(--tz-primary);
    box-shadow: 0 0 0 2px rgba(14, 165, 233, 0.2);
}

/* Use Current Time Button */
.now-btn {
    background: rgba(14, 165, 233, 0.1);
    border: 1px solid rgba(14, 165, 233, 0.25);
    color: var(--tz-primary);
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    transition: all 0.2s ease;
    align-self: flex-start;
}

.now-btn:hover {
    background: rgba(14, 165, 233, 0.2);
}

/* Convert Button */
#convert-btn {
    background: linear-gradient(135deg, var(--tz-primary), var(--tz-primary-hover));
    color: white;
    border: none;
    padding: 1rem;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, filter 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

#convert-btn:hover {
    filter: brightness(1.1);
    transform: translateY(-2px);
}

#convert-btn:active {
    transform: translateY(0);
}

/* Swap Button */
.swap-btn {
    background: transparent;
    border: 1px solid var(--tz-border);
    color: #94a3b8;
    padding: 0.5rem;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    transition: all 0.2s ease;
    margin-top: 0.5rem;
}

.swap-btn:hover {
    border-color: var(--tz-primary);
    color: var(--tz-primary);
}

/* Right Section */
.display-section {
    background: rgba(15, 23, 42, 0.3);
    overflow-y: auto;
    justify-content: flex-start;
}

.placeholder {
    text-align: center;
    color: #94a3b8;
    margin: auto;
}

#result-container {
    width: 100%;
    margin-bottom: 1.5rem;
}

.result-header {
    margin-bottom: 0.75rem;
}

.result-header label {
    font-size: 0.9rem;
    color: #94a3b8;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Conversion Result Cards */
.conversion-result {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.tz-card {
    flex: 1;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--tz-border);
    border-radius: 14px;
    padding: 1rem;
    text-align: center;
}

.tz-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
    margin-bottom: 0.5rem;
}

.tz-time {
    font-size: 1.8rem;
    font-weight: 700;
    color: #f8fafc;
    font-family: 'Courier New', Courier, monospace;
    line-height: 1;
    margin-bottom: 0.3rem;
}

.tz-date {
    font-size: 0.8rem;
    color: #94a3b8;
    margin-bottom: 0.3rem;
}

.tz-zone {
    font-size: 0.7rem;
    color: var(--tz-primary);
    font-weight: 600;
}

.to-card {
    border-color: rgba(14, 165, 233, 0.3);
}

.arrow-divider {
    color: #475569;
    font-size: 1.2rem;
    flex-shrink: 0;
}

/* Diff Badge */
.diff-badge {
    text-align: center;
    margin-top: 0.75rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: #94a3b8;
    background: rgba(15, 23, 42, 0.5);
    padding: 0.4rem 1rem;
    border-radius: 999px;
    display: inline-block;
}

/* World Clocks */
.world-clocks-section {
    flex: 1;
}

.world-clocks-header {
    margin-bottom: 0.6rem;
}

.world-clocks-header label {
    font-size: 0.9rem;
    color: #94a3b8;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.world-clocks-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.4rem;
}

.world-clock-item {
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid var(--tz-border);
    border-radius: 8px;
    padding: 0.5rem 0.6rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.wc-city {
    font-size: 0.75rem;
    color: #94a3b8;
    font-weight: 600;
}

.wc-time {
    font-size: 0.8rem;
    color: #f8fafc;
    font-family: 'Courier New', Courier, monospace;
    font-weight: 700;
}

.hidden {
    display: none !important;
}

/* Responsive */
@media (max-width: 768px) {
    .main-card {
        flex-direction: column;
        height: auto;
    }

    .input-section {
        border-right: none;
        border-bottom: 1px solid var(--tz-border);
        padding: 2rem;
    }

    .display-section {
        padding: 2rem;
        min-height: 400px;
    }

    .brand h1 {
        font-size: 1.6rem;
    }

    .conversion-result {
        flex-direction: column;
    }

    .arrow-divider {
        transform: rotate(90deg);
    }

    .world-clocks-grid {
        grid-template-columns: 1fr;
    }
}
