/* World Clock Styles */

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

/* Current Location Section */
.current-location-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.3);
}

.current-location-section h3 {
    margin: 0 0 20px 0;
    font-size: 18px;
    opacity: 0.9;
}

.current-time-display {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 30px;
    align-items: center;
}

.time-info {
    text-align: left;
}

.current-time {
    font-size: 48px;
    font-weight: 300;
    margin-bottom: 8px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.current-date {
    font-size: 18px;
    margin-bottom: 4px;
    opacity: 0.9;
}

.current-timezone {
    font-size: 14px;
    opacity: 0.8;
}

.location-controls {
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: flex-end;
}

.detect-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    backdrop-filter: blur(10px);
}

.detect-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

.timezone-selector {
    min-width: 200px;
}

.timezone-select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    backdrop-filter: blur(10px);
}

.timezone-select option {
    background: #333;
    color: white;
}

/* Add Clock Section */
.add-clock-section {
    background: white;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.add-clock-section h3 {
    margin: 0 0 20px 0;
    color: #333;
    font-size: 18px;
}

.add-clock-controls {
    display: grid;
    gap: 25px;
}

.search-container {
    position: relative;
}

.city-search {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.2s;
}

.city-search:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #e9ecef;
    border-top: none;
    border-radius: 0 0 8px 8px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 10;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.search-result-item {
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: 1px solid #f8f9fa;
    transition: background-color 0.2s;
}

.search-result-item:hover {
    background: #f8f9fa;
}

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

.quick-add-cities h4 {
    margin: 0 0 15px 0;
    color: #555;
    font-size: 16px;
}

.city-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
}

.city-btn {
    padding: 10px 15px;
    border: 1px solid #e9ecef;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
    color: #555;
}

.city-btn:hover {
    background: #f8f9fa;
    border-color: #007bff;
    color: #007bff;
    transform: translateY(-1px);
}

/* World Clocks Section */
.world-clocks-section {
    background: white;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 15px;
}

.section-header h3 {
    margin: 0;
    color: #333;
    font-size: 18px;
}

.display-options {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    color: #555;
    user-select: none;
}

.checkbox-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #007bff;
}

.clear-all-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
}

.clear-all-btn:hover {
    background: #c82333;
    transform: translateY(-1px);
}

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

.clock-card {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    position: relative;
    transition: all 0.2s;
}

.clock-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.clock-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.clock-location {
    flex: 1;
}

.clock-city {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin: 0 0 4px 0;
}

.clock-timezone {
    font-size: 12px;
    color: #666;
    font-family: monospace;
}

.remove-clock-btn {
    background: none;
    border: none;
    color: #dc3545;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.remove-clock-btn:hover {
    background: #f8d7da;
}

.clock-time {
    font-size: 28px;
    font-weight: 300;
    color: #333;
    margin-bottom: 8px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
}

.clock-date {
    font-size: 14px;
    color: #666;
    margin-bottom: 8px;
}

.clock-offset {
    font-size: 12px;
    color: #888;
    font-style: italic;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.empty-icon {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-state h4 {
    margin: 0 0 10px 0;
    color: #555;
}

.empty-state p {
    margin: 0;
    color: #888;
}

/* Time Zone Converter */
.timezone-converter-section {
    background: white;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.timezone-converter-section h3 {
    margin: 0 0 20px 0;
    color: #333;
    font-size: 18px;
}

.converter-container {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 20px;
    align-items: end;
}

.converter-input,
.converter-output {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.converter-input label,
.converter-output label {
    font-weight: 600;
    color: #555;
    font-size: 14px;
}

.time-input-group {
    display: flex;
    gap: 10px;
}

.time-input,
.date-input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
}

.converter-arrow {
    font-size: 24px;
    color: #007bff;
    font-weight: bold;
    align-self: center;
}

.converted-time {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 15px;
    text-align: center;
}

.converted-time-display {
    font-size: 24px;
    font-weight: 300;
    color: #333;
    margin-bottom: 5px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
}

.converted-date-display {
    font-size: 14px;
    color: #666;
}

/* Meeting Planner */
.meeting-planner-section {
    background: white;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.meeting-planner-section h3 {
    margin: 0 0 20px 0;
    color: #333;
    font-size: 18px;
}

.meeting-controls {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.meeting-input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.meeting-input-group label {
    font-weight: 600;
    color: #555;
    font-size: 14px;
}

.calculate-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    background: #28a745;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 600;
    align-self: end;
}

.calculate-btn:hover {
    background: #218838;
    transform: translateY(-1px);
}

.meeting-results {
    border-top: 1px solid #e9ecef;
    padding-top: 20px;
}

.meeting-results h4 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 16px;
}

.meeting-times-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.meeting-time-card {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 15px;
}

.meeting-time-location {
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.meeting-time-display {
    font-size: 18px;
    color: #007bff;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    margin-bottom: 4px;
}

.meeting-date-display {
    font-size: 14px;
    color: #666;
}

/* Information Section */
.info-section {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 25px;
    border: 1px solid #e9ecef;
}

.info-section h3 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 18px;
}

.info-section p {
    margin: 0 0 10px 0;
    color: #666;
    line-height: 1.6;
}

.info-section ul {
    margin: 10px 0;
    padding-left: 20px;
    color: #666;
}

.info-section li {
    margin-bottom: 5px;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .current-time-display {
        grid-template-columns: 1fr;
        gap: 20px;
        text-align: center;
    }
    
    .location-controls {
        align-items: center;
    }
    
    .converter-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .converter-arrow {
        text-align: center;
        transform: rotate(90deg);
    }
}

@media (max-width: 768px) {
    .world-clock {
        padding: 15px;
    }
    
    .current-location-section,
    .add-clock-section,
    .world-clocks-section,
    .timezone-converter-section,
    .meeting-planner-section,
    .info-section {
        padding: 20px;
    }
    
    .current-time {
        font-size: 36px;
    }
    
    .section-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .display-options {
        justify-content: center;
    }
    
    .clocks-grid {
        grid-template-columns: 1fr;
    }
    
    .city-buttons {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .meeting-controls {
        grid-template-columns: 1fr;
    }
    
    .meeting-times-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .current-time {
        font-size: 28px;
    }
    
    .clock-time {
        font-size: 24px;
    }
    
    .city-buttons {
        grid-template-columns: 1fr;
    }
    
    .time-input-group {
        flex-direction: column;
    }
    
    .display-options {
        flex-direction: column;
        gap: 10px;
    }
}