/* Navigation Bar */
.navbar {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 1rem 0;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.logo a {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2c3e50;
    text-decoration: none;
}

.logo a:hover {
    color: #4361ee;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
}

.nav-link {
    color: #2c3e50;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: #4361ee;
}

.mobile-menu-btn {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Breadcrumb */
.breadcrumb {
    display: flex;
    align-items: center;
    font-size: 0.9rem;
    margin-top: 1rem;
    color: #7f8c8d;
}

.breadcrumb a {
    color: #4361ee;
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.breadcrumb i {
    margin: 0 0.5rem;
    font-size: 0.7rem;
}

/* Base Styles */
:root {
    --primary-color: #4361ee;
    --secondary-color: #3f37c9;
    --accent-color: #4895ef;
    --text-color: #2b2d42;
    --light-text: #f8f9fa;
    --border-color: #e0e0e0;
    --background-light: #f8f9ff;
    --success-color: #4bb543;
    --warning-color: #f9c74f;
    --error-color: #ef476f;
    --box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    --border-radius: 8px;
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: #f5f7ff;
    -webkit-font-smoothing: antialiased;
}

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

/* Header */
.header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 2.5rem 0;
    text-align: center;
    margin-bottom: 2rem;
    box-shadow: var(--box-shadow);
    position: relative;
    overflow: hidden;
}

.header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.header p {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 1rem;
}

.current-time {
    background: rgba(255, 255, 255, 0.15);
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 500;
    backdrop-filter: blur(5px);
}

/* Main Content */
.main-content {
    padding: 1rem 0 3rem;
}

/* Converter Box */
.converter-box {
    background: white;
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--box-shadow);
    margin-bottom: 2.5rem;
}

.time-inputs {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    justify-content: space-between;
}

.time-input-group {
    flex: 1;
    min-width: 280px;
}

.time-input-group h3 {
    margin-bottom: 1rem;
    color: var(--text-color);
    font-size: 1.1rem;
    font-weight: 600;
}

.time-zone-selector {
    position: relative;
    margin-bottom: 1rem;
}

.timezone-search {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: var(--transition);
}

.timezone-search:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.2);
}

.timezone-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    max-height: 250px;
    overflow-y: auto;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 0 0 var(--border-radius) var(--border-radius);
    z-index: 100;
    display: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.timezone-dropdown.visible {
    display: block;
}

.timezone-option {
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: var(--transition);
}

.timezone-option:hover {
    background-color: var(--background-light);
}

.datetime-input {
    display: flex;
    gap: 0.5rem;
}

.date-input, .time-input {
    padding: 0.7rem;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 0.95rem;
    transition: var(--transition);
}

.date-input:focus, .time-input:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.1);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.7rem 1.5rem;
    border: none;
    border-radius: var(--border-radius);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    gap: 0.5rem;
}

.btn i {
    font-size: 0.9em;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--secondary-color);
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline:hover {
    background-color: rgba(67, 97, 238, 0.1);
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

.btn-icon {
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: 50%;
    background: var(--background-light);
    color: var(--primary-color);
}

.btn-icon:hover {
    background: var(--primary-color);
    color: white;
}

/* Swap Button */
.swap-button {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 2.5rem;
}

/* Time Difference */
.time-difference {
    margin: 1.5rem 0;
    padding: 1.5rem;
    background: var(--background-light);
    border-radius: var(--border-radius);
    text-align: center;
}

.difference-arrow {
    font-size: 1.5rem;
    margin-right: 0.5rem;
    color: var(--primary-color);
    vertical-align: middle;
}

.difference-text {
    font-size: 1.1rem;
    font-weight: 500;
    vertical-align: middle;
}

/* Quick Actions */
.quick-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 1.5rem;
}

/* World Clock Section */
.world-clock-section {
    margin-bottom: 3rem;
}

.world-clock-section h2 {
    margin-bottom: 1.5rem;
    color: var(--text-color);
    font-size: 1.5rem;
}

.favorite-timezones {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.favorite-timezone {
    background: white;
    border-radius: var(--border-radius);
    padding: 1rem;
    box-shadow: var(--box-shadow);
    min-width: 200px;
    text-align: center;
    position: relative;
}

.favorite-timezone .remove-favorite {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: none;
    border: none;
    color: var(--error-color);
    cursor: pointer;
    opacity: 0;
    transition: var(--transition);
}

.favorite-timezone:hover .remove-favorite {
    opacity: 1;
}

.major-cities h3 {
    margin: 2rem 0 1rem;
    color: var(--text-color);
    font-size: 1.2rem;
}

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

.city-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 1rem;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    cursor: pointer;
}

.city-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.city-name {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.city-time {
    font-size: 0.9rem;
    color: #666;
}

/* Meeting Planner */
.meeting-planner {
    background: white;
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--box-shadow);
    margin-top: 2rem;
}

.meeting-planner h2 {
    margin-bottom: 1rem;
    color: var(--text-color);
}

.meeting-planner p {
    margin-bottom: 1.5rem;
    color: #666;
}

.participants {
    margin-bottom: 1.5rem;
}

.participant {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    align-items: center;
}

.timezone-select {
    flex: 1;
    padding: 0.7rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 0.95rem;
    transition: var(--transition);
}

.timezone-select:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.1);
}

.remove-participant {
    background: none;
    border: none;
    color: var(--error-color);
    font-size: 1.5rem;
    cursor: pointer;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--transition);
}

.remove-participant:hover {
    background-color: rgba(239, 71, 111, 0.1);
}

.meeting-suggestions {
    margin-top: 2rem;
    display: none;
}

/* Info Section */
.info-section {
    background: white;
    padding: 3rem 0;
    margin-top: 3rem;
}

.info-section h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--text-color);
    font-size: 1.8rem;
}

.info-section p {
    margin-bottom: 2rem;
    color: #555;
    line-height: 1.7;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

.timezone-facts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
}

.fact {
    text-align: center;
    padding: 2rem 1.5rem;
    background: var(--background-light);
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.fact:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
}

.fact i {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.fact h3 {
    margin-bottom: 0.75rem;
    color: var(--text-color);
}

.fact p {
    font-size: 0.95rem;
    color: #666;
    margin: 0;
}

.timezone-table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
}

.table-row {
    display: flex;
    border-bottom: 1px solid var(--border-color);
}

.table-row:last-child {
    border-bottom: none;
}

.table-row.header {
    background-color: var(--primary-color);
    color: white;
    font-weight: 600;
}

.cell {
    flex: 1;
    padding: 1rem;
    text-align: left;
}

.table-row.header .cell {
    text-align: center;
}

/* Footer */
.footer {
    background: #2c3e50;
    color: #fff;
    padding: 4rem 0 0;
    margin-top: 4rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 20px;
}

.footer-section h3 {
    color: #fff;
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
    position: relative;
    padding-bottom: 0.5rem;
}

.footer-section h3::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 50px;
    height: 2px;
    background: #4361ee;
}

.footer-section p {
    color: #ecf0f1;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.footer-section ul {
    list-style: none;
    padding: 0;
}

.footer-section ul li {
    margin-bottom: 0.8rem;
}

.footer-section ul li a {
    color: #bdc3c7;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: #fff;
    padding-left: 5px;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: #fff;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: #4361ee;
    transform: translateY(-3px);
}

.footer-bottom {
    background: rgba(0, 0, 0, 0.2);
    padding: 1.5rem 0;
    text-align: center;
    margin-top: 2rem;
}

.footer-bottom p {
    margin: 0;
    color: #bdc3c7;
    font-size: 0.9rem;
}

.footer-links {
    margin-top: 1rem;
}

.footer-links a {
    color: #bdc3c7;
    text-decoration: none;
    margin: 0 0.5rem;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #fff;
}

.footer-links span {
    color: #7f8c8d;
}

/* Back to Top Button */
#back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #4361ee;
    color: white;
    border: none;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    z-index: 99;
}

#back-to-top:hover {
    background: #3a56d4;
    transform: translateY(-3px);
}

/* Responsive Styles */
@media (max-width: 992px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #fff;
        flex-direction: column;
        padding: 1rem;
        box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
    }
    
    .nav-links.show {
        display: flex;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .footer-content {
        grid-template-columns: 1fr 1fr;
        padding: 0 20px;
    }
}

@media (max-width: 768px) {
    .footer-content {
        grid-template-columns: 1fr;
    }
    
    .footer-section {
        text-align: center;
    }
    
    .footer-section h3::after {
        left: 50%;
        transform: translateX(-50%);
    }
    
    .social-links {
        justify-content: center;
    }
    
    #back-to-top {
        width: 40px;
        height: 40px;
        bottom: 20px;
        right: 20px;
    }
}

/* Footer */
.footer {
    background: #2b2d42;
    color: white;
    padding: 2.5rem 0;
    text-align: center;
}

.footer p {
    margin-bottom: 1rem;
    color: rgba(255, 255, 255, 0.8);
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 1.5rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: var(--transition);
}

.footer-links a:hover {
    color: white;
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 992px) {
    .time-inputs {
        flex-direction: column;
    }
    
    .swap-button {
        margin: 0.5rem 0;
    }
    
    .quick-actions {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .header h1 {
        font-size: 2rem;
    }
    
    .datetime-input {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
    
    .cities-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
}

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

.converter-box, .world-clock-section, .meeting-planner, .info-section {
    animation: fadeIn 0.6s ease-out forwards;
}

/* Utility Classes */
.hidden {
    display: none !important;
}

.text-center {
    text-align: center;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
