* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #0f0c29 0%, #302b63 50%, #24243e 100%);
    color: #fff;
    min-height: 100vh;
    overflow-x: hidden;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-brand a {
    color: #fff;
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: 700;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.nav-links a {
    color: #fff;
    text-decoration: none;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: #667eea;
}

.language-switcher {
    display: flex;
    gap: 0.5rem;
}

.language-switcher button {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.language-switcher button:hover,
.language-switcher button.active {
    background: #667eea;
    border-color: #667eea;
}

.user-email {
    color: #667eea;
    font-weight: 600;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

.page-header {
    text-align: center;
    margin-bottom: 3rem;
}

.page-header h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.page-header p {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.7);
}

.search-section {
    position: relative;
    max-width: 600px;
    margin: 0 auto 3rem;
}

.search-section input {
    width: 100%;
    padding: 1rem 1.5rem;
    font-size: 1.1rem;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    color: #fff;
    transition: all 0.3s;
}

.search-section input:focus {
    outline: none;
    border-color: #667eea;
    background: rgba(255, 255, 255, 0.15);
}

.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(30, 30, 50, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    margin-top: 0.5rem;
    max-height: 300px;
    overflow-y: auto;
    z-index: 10;
}

.search-result-item {
    padding: 1rem 1.5rem;
    cursor: pointer;
    transition: background 0.2s;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.search-result-item:hover {
    background: rgba(102, 126, 234, 0.2);
}

.main-interface {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 2rem;
    margin-bottom: 3rem;
    min-height: 600px;
    overflow: hidden;  /* ← добавь это */
}

@media (max-width: 1024px) {
    .main-interface {
        grid-template-columns: 1fr;
    }
}

.globe-container {
    position: relative;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 1;
    max-width: 100%;
}

#globe {
    width: 100%;
    height: 600px;
    position: relative;
    z-index: 2;
}

/* Добавь это для canvas внутри глобуса */
#globe canvas {
    max-width: 100% !important;
    max-height: 100% !important;
}

.globe-controls {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
}

.globe-controls button {
    background: rgba(102, 126, 234, 0.8);
    border: none;
    color: #fff;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

.globe-controls button:hover {
    background: rgba(102, 126, 234, 1);
    transform: translateY(-2px);
}

.info-panel {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.3);
}

.city-info h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: #667eea;
}

.time-display {
    margin-bottom: 1.5rem;
}

.current-time {
    font-size: 3rem;
    font-weight: 700;
    font-family: 'Courier New', monospace;
    color: #fff;
    text-shadow: 0 0 20px rgba(102, 126, 234, 0.5);
}

.current-date {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.7);
    margin-top: 0.5rem;
}

.timezone-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    margin-bottom: 2rem;
}

.timezone-info span {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
}

.astronomy-data {
    margin-bottom: 2rem;
}

.astronomy-data h3 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: #667eea;
}

.astro-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.astro-item {
    background: rgba(0, 0, 0, 0.2);
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
}

.astro-item label {
    display: block;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 0.5rem;
}

.astro-item span {
    font-size: 1.2rem;
    font-weight: 600;
    color: #fff;
}

.moon-info {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    margin-bottom: 2rem;
}

.moon-icon {
    font-size: 4rem;
}

.moon-details {
    flex: 1;
}

.moon-details div:first-child {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.moon-details div:last-child {
    color: rgba(255, 255, 255, 0.7);
}

.solar-angle {
    padding: 1.5rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
}

.angle-value {
    font-size: 2rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 1rem;
    color: #ffd700;
}

.angle-bar {
    height: 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    overflow: hidden;
}

.angle-fill {
    height: 100%;
    background: linear-gradient(90deg, #ff6b6b 0%, #ffd700 50%, #667eea 100%);
    transition: width 0.5s;
}

.action-buttons {
    display: flex;
    gap: 1rem;
}

.btn-primary {
    flex: 1;
    padding: 1rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 12px;
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

.favorites-section {
    margin-bottom: 3rem;
}

.favorites-section h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: #667eea;
}

.favorites-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
}

.favorite-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s;
}

.favorite-item:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.fav-city {
    font-weight: 600;
    font-size: 1.1rem;
}

.fav-time {
    font-family: 'Courier New', monospace;
    font-size: 1.2rem;
    color: #667eea;
}

.btn-remove {
    background: rgba(231, 76, 60, 0.2);
    border: none;
    color: #e74c3c;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-remove:hover {
    background: rgba(231, 76, 60, 0.4);
}

.login-hint {
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
    padding: 2rem;
}

.calendar-section {
    margin-bottom: 3rem;
}

.calendar-section h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: #667eea;
}

.calendar-controls {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.calendar-controls input,
.calendar-controls select {
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: #fff;
    font-size: 1rem;
}

.holidays-list {
    display: grid;
    gap: 0.75rem;
}

.holiday-item {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    border-left: 3px solid #667eea;
}

.holiday-date {
    font-weight: 600;
    color: #667eea;
    min-width: 100px;
}

.holiday-name {
    flex: 1;
}

.no-holidays {
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
    padding: 2rem;
}

@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        gap: 1rem;
    }
    
    .page-header h1 {
        font-size: 2rem;
    }
    
    .current-time {
        font-size: 2rem;
    }
    
    .astro-grid {
        grid-template-columns: 1fr;
    }
    
    .calendar-controls {
        flex-direction: column;
    }
}