/* World Clock Tool Styles */

:root {
    --primary-color: #2563eb;
    --secondary-color: #7c3aed;
    --accent-color: #059669;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --error-color: #ef4444;
    --background-color: #f8fafc;
    --surface-color: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --border-color: #e2e8f0;
    --shadow-light: 0 1px 3px 0 rgb(0 0 0 / 0.1);
    --shadow-medium: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --shadow-heavy: 0 20px 25px -5px rgb(0 0 0 / 0.1);
    --border-radius: 12px;
    --transition: all 0.3s ease;
    --clock-size: 200px;
}

[data-theme="dark"] {
    --background-color: #0f172a;
    --surface-color: #1e293b;
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --border-color: #334155;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--background-color);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
header {
    text-align: center;
    margin-bottom: 3rem;
}

header h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

header .icon {
    font-size: 3.5rem;
}

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

/* Local Time Section */
.local-time-section {
    margin-bottom: 3rem;
}

.local-time-card {
    background: var(--surface-color);
    border-radius: var(--border-radius);
    padding: 2.5rem;
    text-align: center;
    box-shadow: var(--shadow-medium);
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.local-time-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
}

.time-header {
    margin-bottom: 1.5rem;
}

.time-header h3 {
    font-size: 1.5rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.timezone-info {
    color: var(--text-secondary);
    font-size: 1rem;
    font-weight: 500;
}

.current-time {
    font-size: 4rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-family: 'Monaco', 'Menlo', monospace;
    text-shadow: 0 2px 4px rgb(0 0 0 / 0.1);
}

.current-date {
    font-size: 1.2rem;
    color: var(--text-secondary);
    font-weight: 600;
}

/* Quick Add Section */
.quick-add-section {
    background: var(--surface-color);
    border-radius: var(--border-radius);
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-light);
    border: 1px solid var(--border-color);
}

.quick-add-section h3 {
    margin-bottom: 2rem;
    font-size: 1.5rem;
    color: var(--text-primary);
    text-align: center;
}

.quick-cities {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.quick-city-card {
    background: var(--background-color);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.quick-city-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.quick-city-card.added {
    border-color: var(--success-color);
    background: rgba(16, 185, 129, 0.05);
    cursor: not-allowed;
}

.quick-city-card.added::after {
    content: '✓';
    position: absolute;
    top: 8px;
    right: 8px;
    color: var(--success-color);
    font-weight: bold;
}

.city-flag {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.city-name {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.city-timezone {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* Search Section */
.search-section {
    background: var(--surface-color);
    border-radius: var(--border-radius);
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-light);
    border: 1px solid var(--border-color);
}

.search-header h3 {
    margin-bottom: 2rem;
    font-size: 1.5rem;
    color: var(--text-primary);
    text-align: center;
}

.search-input-group {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

#city-search {
    flex: 1;
    min-width: 250px;
    padding: 1rem 1.5rem;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    background: var(--background-color);
    color: var(--text-primary);
    font-size: 1rem;
    transition: var(--transition);
}

#city-search:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgb(37 99 235 / 0.1);
}

.primary-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: var(--border-radius);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.primary-btn:hover {
    background: #1d4ed8;
    transform: translateY(-1px);
    box-shadow: var(--shadow-medium);
}

.secondary-btn {
    background: var(--background-color);
    color: var(--text-primary);
    border: 2px solid var(--border-color);
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.secondary-btn:hover {
    border-color: var(--error-color);
    color: var(--error-color);
}

.search-results {
    max-height: 200px;
    overflow-y: auto;
    border-radius: 8px;
    background: var(--background-color);
    border: 1px solid var(--border-color);
    display: none;
}

.search-result-item {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover {
    background: var(--surface-color);
}

.result-info {
    flex: 1;
}

.result-city {
    font-weight: 600;
    color: var(--text-primary);
}

.result-timezone {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* Clocks Section */
.clocks-section {
    margin-bottom: 3rem;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.section-header h3 {
    font-size: 1.5rem;
    color: var(--text-primary);
}

.clocks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.clock-card {
    background: var(--surface-color);
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--shadow-light);
    border: 1px solid var(--border-color);
    text-align: center;
    position: relative;
    transition: var(--transition);
}

.clock-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.clock-remove {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--error-color);
    color: white;
    border: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    transition: var(--transition);
}

.clock-remove:hover {
    background: #dc2626;
}

.clock-city {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.clock-timezone {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.clock-time {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-family: 'Monaco', 'Menlo', monospace;
}

.clock-date {
    font-size: 1rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.clock-offset {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: var(--accent-color);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
}

/* Meeting Section */
.meeting-section {
    background: var(--surface-color);
    border-radius: var(--border-radius);
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-light);
    border: 1px solid var(--border-color);
}

.meeting-section h3 {
    margin-bottom: 2rem;
    font-size: 1.5rem;
    color: var(--text-primary);
    text-align: center;
}

.meeting-controls {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    align-items: end;
}

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

.time-input-group label {
    font-weight: 600;
    color: var(--text-primary);
}

#meeting-time, #meeting-timezone {
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    background: var(--background-color);
    color: var(--text-primary);
    font-size: 1rem;
}

#meeting-time:focus, #meeting-timezone:focus {
    outline: none;
    border-color: var(--primary-color);
}

.meeting-results {
    display: none;
    background: var(--background-color);
    border-radius: 8px;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
}

.meeting-time-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    margin-bottom: 0.5rem;
    background: var(--surface-color);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.meeting-time-card:last-child {
    margin-bottom: 0;
}

.meeting-city-info {
    flex: 1;
}

.meeting-city-name {
    font-weight: 600;
    color: var(--text-primary);
}

.meeting-timezone-name {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.meeting-time-info {
    text-align: right;
}

.meeting-local-time {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary-color);
    font-family: 'Monaco', 'Menlo', monospace;
}

.meeting-local-date {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* Tips Section */
.tips-section {
    background: var(--surface-color);
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--shadow-light);
    border: 1px solid var(--border-color);
}

.tips-section h3 {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 1.5rem;
    color: var(--text-primary);
}

.tips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.tip-item {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.tip-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.tip-content h4 {
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-size: 1rem;
}

.tip-content p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
}

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

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.fade-in {
    animation: fadeInUp 0.5s ease;
}

.pulse {
    animation: pulse 1s ease-in-out infinite;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }

    header h1 {
        font-size: 2.5rem;
        flex-direction: column;
        gap: 0.5rem;
    }

    .current-time {
        font-size: 3rem;
    }

    .quick-cities {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }

    .search-input-group {
        flex-direction: column;
    }

    #city-search {
        min-width: auto;
    }

    .section-header {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }

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

    .meeting-controls {
        flex-direction: column;
    }

    .time-input-group {
        min-width: auto;
    }

    .meeting-time-card {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }

    .meeting-time-info {
        text-align: center;
    }

    .tips-grid {
        grid-template-columns: 1fr;
    }

    .tip-item {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 2rem;
    }

    .local-time-card, .quick-add-section, .search-section, .meeting-section, .tips-section {
        padding: 1.5rem;
    }

    .current-time {
        font-size: 2.5rem;
    }

    .clock-time {
        font-size: 2rem;
    }

    .quick-cities {
        grid-template-columns: repeat(2, 1fr);
    }

    .clock-card {
        padding: 1.5rem;
    }
}