/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #f8f9fa;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

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

/* Header */
header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.logo a {
    color: white;
    font-size: 1.8rem;
    font-weight: bold;
    text-decoration: none;
}

nav a {
    color: white;
    text-decoration: none;
    margin-left: 2rem;
    opacity: 0.9;
    transition: opacity 0.3s;
}

nav a:hover {
    opacity: 1;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 4rem 0;
    text-align: center;
    margin-bottom: 3rem;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.hero .subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: 2rem;
}

/* Search Box */
.search-box {
    max-width: 600px;
    margin: 0 auto;
}

.search-box form {
    display: flex;
    gap: 10px;
}

.search-box input {
    flex: 1;
    padding: 1rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
}

.search-box button {
    padding: 1rem 2rem;
    background: #ff6b6b;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.3s;
}

.search-box button:hover {
    background: #ff5252;
}

/* Features */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.feature {
    text-align: center;
    padding: 2rem;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.feature h3 {
    margin-bottom: 1rem;
    color: #764ba2;
}

/* City Grid */
.city-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.city-card {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

.city-card:hover {
    transform: translateY(-5px);
}

.city-card h3 a {
    color: #333;
    text-decoration: none;
}

.city-card .country {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.city-card .time {
    font-size: 2rem;
    font-weight: bold;
    color: #764ba2;
    margin-bottom: 1rem;
}

.city-links {
    display: flex;
    gap: 1rem;
}

.city-links a {
    color: #667eea;
    text-decoration: none;
    font-size: 0.9rem;
}

/* Time Widget */
.time-widget {
    background: white;
    border-radius: 10px;
    padding: 2rem;
    margin: 2rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.current-time {
    text-align: center;
    margin-bottom: 2rem;
}

.time-display {
    font-size: 4rem;
    font-weight: bold;
    color: #764ba2;
    line-height: 1.2;
}

.date-display {
    font-size: 1.2rem;
    color: #666;
}

.timezone-info table {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
}

.timezone-info th,
.timezone-info td {
    padding: 0.5rem;
    text-align: left;
}

.timezone-info th {
    color: #666;
    font-weight: normal;
}

/* Sun Info */
.sun-info {
    background: white;
    border-radius: 10px;
    padding: 2rem;
    margin: 2rem 0;
}

.sun-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.sun-card {
    text-align: center;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.sun-card h4 {
    color: #666;
    margin-bottom: 0.5rem;
}

.sun-value {
    font-size: 1.5rem;
    font-weight: bold;
    color: #764ba2;
}

.sun-times-large {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin: 2rem 0;
}

.sun-time-box {
    text-align: center;
    padding: 2rem;
    border-radius: 10px;
    color: white;
}

.sun-time-box.sunrise {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.sun-time-box.sunset {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.sun-time-box .label {
    display: block;
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    opacity: 0.9;
}

.sun-time-box .value {
    font-size: 2.5rem;
    font-weight: bold;
}

.sun-table {
    width: 100%;
    max-width: 500px;
    margin: 2rem auto;
}

.sun-table th,
.sun-table td {
    padding: 1rem;
    border-bottom: 1px solid #eee;
}

.sun-note,
.photography-tips {
    color: #666;
    font-style: italic;
    margin-top: 1rem;
}

/* Ad Containers */
.ad-container {
    margin: 3rem 0;
    min-height: 100px;
    background: #f8f9fa;
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Footer */
footer {
    background: #333;
    color: white;
    padding: 2rem 0;
    margin-top: 3rem;
}

footer .container {
    text-align: center;
}

footer .disclaimer {
    font-size: 0.9rem;
    opacity: 0.8;
    margin-top: 1rem;
}

/* Responsive */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2rem;
    }
    
    .time-display {
        font-size: 3rem;
    }
    
    .sun-times-large {
        grid-template-columns: 1fr;
    }
    
    nav a {
        margin-left: 1rem;
    }
    
    .search-box form {
        flex-direction: column;
    }
    
    .city-grid {
        grid-template-columns: 1fr;
    }
}

/* Error Page */
.error-page {
    text-align: center;
    padding: 4rem 0;
}

.error-page h1 {
    font-size: 3rem;
    color: #764ba2;
    margin-bottom: 1rem;
}

/* City List */
.city-list-item {
    background: white;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.city-list-links {
    display: flex;
    gap: 1rem;
}

/* Popular Conversions */
.popular-conversions ul {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin: 1rem 0;
}

.popular-conversions li a {
    display: block;
    padding: 0.5rem 1rem;
    background: #f8f9fa;
    border-radius: 5px;
    color: #667eea;
    text-decoration: none;
    text-align: center;
}

.popular-conversions li a:hover {
    background: #667eea;
    color: white;
}