* { 
    box-sizing: border-box; 
}

body { 
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif; 
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); 
    margin: 0; 
    min-height: 100vh;
    padding: 0;
    line-height: 1.6;
}

/* Navigation */
nav.breadcrumb {
    background: rgba(255,255,255,0.1);
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

.breadcrumb ol {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.breadcrumb li {
    color: rgba(255,255,255,0.8);
}

.breadcrumb li:not(:last-child)::after {
    content: " › ";
    margin: 0 8px;
    color: rgba(255,255,255,0.6);
}

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

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

/* Header */
header {
    background: rgba(255,255,255,0.1); 
    backdrop-filter: blur(10px);
    color: #fff; 
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: #fff;
    text-decoration: none;
}

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

.nav-links a {
    color: rgba(255,255,255,0.9);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

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

.page-header {
    text-align: center;
    padding: 2rem 1rem;
    max-width: 1200px;
    margin: 0 auto;
}

.page-header h1 {
    margin: 0 0 1rem 0;
    font-size: 2rem;
}

.header-desc {
    margin: 0;
    font-size: 1.1rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

/* Main Content */
main {
    max-width: 1200px;
    margin: 0 auto;
}

/* Controls */
.controls-section {
    background: rgba(255,255,255,0.9); 
    backdrop-filter: blur(10px);
    margin: 1rem;
    border-radius: 15px;
    overflow: hidden;
}

#controls { 
    display: flex; 
    flex-direction: column;
    gap: 10px; 
    padding: 1rem; 
}

.control-row {
    display: flex;
    gap: 10px;
    align-items: center;
}

input, select { 
    flex: 1;
    padding: 12px 16px; 
    font-size: 1rem; 
    border: none; 
    border-radius: 25px; 
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    outline: none;
}

input:focus, select:focus {
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.3);
}

button { 
    padding: 12px 20px; 
    font-size: 1rem; 
    border: none; 
    border-radius: 25px;
    cursor: pointer; 
    background: #667eea; 
    color: white; 
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
}

button:hover { 
    background: #5a6fd8; 
    transform: translateY(-2px);
}

/* Clock Container */
#clockContainer { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); 
    gap: 16px; 
    padding: 1rem; 
}

.clockCard { 
    background: rgba(255,255,255,0.95); 
    backdrop-filter: blur(10px);
    padding: 1.5rem; 
    border-radius: 20px; 
    box-shadow: 0 8px 32px rgba(0,0,0,0.1); 
    display: flex; 
    flex-direction: column; 
    align-items: center;
    position: relative;
    overflow: hidden;
    min-height: 200px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.clockCard:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.15);
}

.clockCard.favorite {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    border: 2px solid #ffd700;
}

.favorite-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #ff6b6b;
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

.flagImg { 
    width: 48px; 
    height: 36px; 
    border-radius: 8px; 
    object-fit: cover; 
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    margin-bottom: 12px;
}

.country { 
    font-weight: 600; 
    font-size: 1rem; 
    color: #2d3748; 
    text-align: center; 
    margin-bottom: 4px;
}

.city-name {
    font-size: 0.85rem;
    color: #718096;
    text-align: center;
    margin-bottom: 16px;
    word-break: break-word;
    line-height: 1.2;
}

.time { 
    font-size: 2rem; 
    font-weight: 700;
    color: #667eea; 
    text-align: center;
    margin-bottom: 16px;
    font-family: 'Courier New', monospace;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.date-info {
    font-size: 0.8rem;
    color: #a0aec0;
    text-align: center;
    margin-bottom: 16px;
}

.favBtn { 
    padding: 8px 16px;
    font-size: 0.85rem; 
    background: #48bb78; 
    color: white; 
    border: none;
    border-radius: 20px; 
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    white-space: nowrap;
    min-width: 120px;
}

.favBtn:hover { 
    background: #38a169; 
    transform: scale(1.05);
}

.favBtn.remove {
    background: #e53e3e;
}

.favBtn.remove:hover {
    background: #c53030;
}

.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 200px;
    font-size: 1.2rem;
    color: white;
}

/* SEO Content */
.seo-content {
    background: rgba(255,255,255,0.95);
    margin: 1rem;
    padding: 2rem;
    border-radius: 15px;
    backdrop-filter: blur(10px);
}

.seo-content h2 {
    color: #2d3748;
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

.seo-content h3 {
    color: #4a5568;
    font-size: 1.4rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.seo-content p {
    color: #2d3748;
    line-height: 1.7;
    margin-bottom: 1rem;
}

.seo-content ul, .seo-content ol {
    color: #2d3748;
    padding-left: 1.5rem;
}

.seo-content li {
    margin-bottom: 0.5rem;
}

/* Footer */
footer {
    background: rgba(0,0,0,0.8);
    color: white;
    margin-top: 3rem;
    padding: 1rem 0;
}

.footer-bottom {
    text-align: center;
    padding: 1rem;
    color: rgba(255,255,255,0.8);
}

/* Screen Reader Only */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav-links {
        gap: 1rem;
    }
    
    .page-header h1 {
        font-size: 1.5rem;
    }
    
    .header-desc {
        font-size: 1rem;
    }
    
    #clockContainer { 
        grid-template-columns: 1fr; 
        padding: 0.5rem; 
        gap: 12px;
    }
    
    .clockCard {
        padding: 1rem;
        min-height: 180px;
    }
    
    .time { 
        font-size: 1.8rem; 
    }
    
    .country { 
        font-size: 0.95rem; 
    }
    
    .city-name {
        font-size: 0.8rem;
    }
    
    input, select, button {
        padding: 10px 14px;
        font-size: 0.95rem;
    }
    
    .seo-content {
        padding: 1.5rem;
    }
    
    .seo-content h2 {
        font-size: 1.5rem;
    }
    
    .seo-content h3 {
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    .control-row {
        flex-direction: column;
    }
    
    .breadcrumb ol {
        flex-wrap: wrap;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
}
