* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Arial, sans-serif;
}

:root {
    --primary-color: #4a90e2;
    --secondary-color: #5c6bc0;
    --success-color: #66bb6a;
    --error-color: #f44336;
    --text-color: #333;
    --light-text: #666;
    --border-radius: 12px;
    --card-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    --background-start: #667eea;
    --background-end: #764ba2;
    --card-bg: rgba(255, 255, 255, 0.95);
}

[data-theme="dark"] {
    --primary-color: #64b5f6;
    --secondary-color: #7986cb;
    --text-color: #e0e0e0;
    --light-text: #bdbdbd;
    --background-start: #1a237e;
    --background-end: #311b92;
    --card-bg: rgba(33, 33, 33, 0.95);
}

body {
    background: linear-gradient(135deg, var(--background-start) 0%, var(--background-end) 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    transition: background 0.3s ease;
}

.container {
    width: 100%;
    max-width: 500px;
}

.calculator-card {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

h1 {
    text-align: center;
    color: var(--text-color);
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

h1 i {
    color: var(--primary-color);
}

.tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 2rem;
    border-bottom: 2px solid #eee;
    padding-bottom: 1rem;
    overflow-x: auto;
    scrollbar-width: none;
}

.tabs::-webkit-scrollbar {
    display: none;
}

.tab-btn {
    background: none;
    border: none;
    padding: 0.8rem 1.2rem;
    font-size: 0.9rem;
    color: var(--light-text);
    cursor: pointer;
    border-radius: var(--border-radius);
    transition: all 0.3s ease;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 6px;
}

.tab-btn i {
    font-size: 1rem;
}

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

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

.input-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    color: var(--text-color);
    margin-bottom: 0.5rem;
    font-weight: 500;
}

input[type="date"] {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid #eee;
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: border-color 0.3s ease;
    background: transparent;
    color: var(--text-color);
}

input[type="date"]:focus {
    border-color: var(--primary-color);
    outline: none;
}

.primary-btn, .secondary-btn {
    width: 100%;
    border: none;
    padding: 1rem;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: transform 0.2s ease, background 0.3s ease;
}

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

.secondary-btn {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    margin-top: 1rem;
}

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

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

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

.result {
    text-align: center;
    font-size: 1.1rem;
    color: var(--text-color);
    margin: 1.5rem 0;
    min-height: 1.5rem;
}

.details {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-top: 2rem;
}

.detail-box {
    background: rgba(0, 0, 0, 0.05);
    padding: 1rem;
    border-radius: var(--border-radius);
    text-align: center;
    transition: transform 0.3s ease;
}

.detail-box:hover {
    transform: translateY(-5px);
}

.detail-box .label {
    display: block;
    color: var(--light-text);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.detail-box .value {
    display: block;
    color: var(--primary-color);
    font-size: 1.5rem;
    font-weight: bold;
}

.extra-info {
    margin-top: 1.5rem;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.05);
    border-radius: var(--border-radius);
    color: var(--text-color);
    font-size: 0.9rem;
    display: none;
    line-height: 1.6;
}

.extra-info.show {
    display: block;
    animation: slideIn 0.3s ease;
}

.zodiac-result {
    text-align: center;
    margin-top: 2rem;
    background: rgba(0, 0, 0, 0.05);
    padding: 2rem;
    border-radius: var(--border-radius);
}

.zodiac-sign {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.zodiac-info {
    color: var(--text-color);
    line-height: 1.6;
}

.timeline {
    margin-top: 2rem;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.05);
    border-radius: var(--border-radius);
}

.milestone {
    padding: 1rem;
    margin: 1rem 0;
    border-left: 3px solid var(--primary-color);
    background: rgba(255, 255, 255, 0.1);
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
    position: relative;
    padding-left: 2rem;
}

.milestone:before {
    content: '';
    position: absolute;
    left: -2px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--primary-color);
}

.milestone:after {
    content: '';
    position: absolute;
    left: -7px;
    top: 1.5rem;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--primary-color);
}

.milestone-title {
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.milestone-description {
    color: var(--text-color);
    font-size: 0.9rem;
}

.share-section {
    margin-top: 2rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.birthday-countdown {
    margin-top: 2rem;
    text-align: center;
}

.countdown-title {
    color: var(--text-color);
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.countdown-boxes {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.countdown-box {
    background: var(--primary-color);
    color: white;
    padding: 1rem;
    border-radius: var(--border-radius);
    min-width: 80px;
    transition: transform 0.3s ease;
}

.countdown-box:hover {
    transform: translateY(-5px);
}

.countdown-box .count {
    display: block;
    font-size: 1.8rem;
    font-weight: bold;
    line-height: 1;
}

.countdown-box .label {
    display: block;
    font-size: 0.8rem;
    margin-top: 0.5rem;
    opacity: 0.9;
}

.stats-container {
    margin-top: 2rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-item {
    background: rgba(0, 0, 0, 0.05);
    padding: 1rem;
    border-radius: var(--border-radius);
    text-align: center;
}

.stat-value {
    font-size: 1.5rem;
    color: var(--primary-color);
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--text-color);
    font-size: 0.9rem;
}

.stats-chart {
    background: rgba(0, 0, 0, 0.05);
    padding: 1rem;
    border-radius: var(--border-radius);
    margin-top: 1rem;
}

.date-facts {
    margin-top: 1.5rem;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.05);
    border-radius: var(--border-radius);
    color: var(--text-color);
}

.fact-item {
    margin: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
}

.fact-item:before {
    content: '•';
    position: absolute;
    left: 0.5rem;
    color: var(--primary-color);
}

.compatibility {
    margin-top: 1.5rem;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.05);
    border-radius: var(--border-radius);
}

.compatibility-title {
    color: var(--primary-color);
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.compatibility-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
}

.compatibility-item {
    background: white;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    font-size: 0.9rem;
    color: var(--text-color);
    border: 1px solid var(--primary-color);
}

[data-theme="dark"] .compatibility-item {
    background: rgba(255, 255, 255, 0.1);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from { 
        opacity: 0;
        transform: translateY(-10px);
    }
    to { 
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 480px) {
    .tabs {
        flex-wrap: nowrap;
        margin-bottom: 1rem;
    }
    
    .share-section {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .countdown-boxes {
        flex-direction: column;
        align-items: center;
    }
    
    .countdown-box {
        width: 100%;
        max-width: 200px;
    }
}
