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

:root {
    /* Light Mode (Green Theme) */
    --bg-gradient: linear-gradient(135deg, #2d5016 0%, #3d6e1f 25%, #4a7c59 50%, #5e8b65 75%, #76b583 100%);
    --container-bg: rgba(45, 80, 22, 0.85);
    --container-border: rgba(118, 181, 131, 0.3);
    --border-gradient: linear-gradient(45deg, #76b583, #52b788, #40916c, #2d5016);
    --text-color: #ffffff;
    --title-gradient: linear-gradient(45deg, #76b583, #a8dadc, #52b788);
    --label-color: #a8dadc;
    --input-bg: rgba(118, 181, 131, 0.15);
    --input-border: rgba(118, 181, 131, 0.3);
    --input-focus-bg: rgba(118, 181, 131, 0.25);
    --input-focus-border: #76b583;
    --button-bg: linear-gradient(45deg, #52b788, #76b583, #40916c);
    --button-hover-bg: linear-gradient(45deg, #40916c, #52b788, #76b583);
    --result-bg: rgba(45, 80, 22, 0.7);
    --result-border: rgba(118, 181, 131, 0.4);
    --result-section-bg: rgba(118, 181, 131, 0.1);
    --result-section-border: #76b583;
    --result-title-color: #76b583;
    --zodiac-color: #a8dadc;
    --star-color: #76b583;
}

[data-theme="dark"] {
    /* Dark Mode */
    --bg-gradient: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 25%, #16213e 50%, #0f3460 75%, #533483 100%);
    --container-bg: rgba(26, 26, 46, 0.9);
    --container-border: rgba(83, 52, 131, 0.4);
    --border-gradient: linear-gradient(45deg, #533483, #0f3460, #16213e, #1a1a2e);
    --text-color: #e8e8e8;
    --title-gradient: linear-gradient(45deg, #bb86fc, #cf6679, #03dac6);
    --label-color: #bb86fc;
    --input-bg: rgba(83, 52, 131, 0.2);
    --input-border: rgba(83, 52, 131, 0.4);
    --input-focus-bg: rgba(83, 52, 131, 0.3);
    --input-focus-border: #bb86fc;
    --button-bg: linear-gradient(45deg, #533483, #bb86fc, #0f3460);
    --button-hover-bg: linear-gradient(45deg, #bb86fc, #533483, #cf6679);
    --result-bg: rgba(26, 26, 46, 0.8);
    --result-border: rgba(187, 134, 252, 0.4);
    --result-section-bg: rgba(83, 52, 131, 0.15);
    --result-section-border: #bb86fc;
    --result-title-color: #bb86fc;
    --zodiac-color: #03dac6;
    --star-color: #bb86fc;
}

body {
    font-family: 'Arial', sans-serif;
    background: var(--bg-gradient);
    color: var(--text-color);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    position: relative;
    overflow-x: hidden;
    transition: all 0.3s ease;
}

.container {
    background: var(--container-bg);
    backdrop-filter: blur(15px);
    padding: 2.5rem;
    border-radius: 25px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3), 
                0 0 30px var(--container-border);
    text-align: center;
    width: 100%;
    max-width: 450px;
    border: 2px solid var(--container-border);
    position: relative;
    z-index: 10;
    transition: all 0.3s ease;
}

.container::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: var(--border-gradient);
    border-radius: 25px;
    z-index: -1;
    opacity: 0.7;
}

.container h1 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    background: var(--title-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 2px 10px var(--result-title-color);
    font-weight: bold;
}

form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    text-align: left;
}

label {
    font-size: 1rem;
    margin-bottom: 0.8rem;
    display: block;
    color: var(--label-color);
    font-weight: 600;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

input[type="text"], 
input[type="number"] {
    width: 100%;
    padding: 1rem;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    background: var(--input-bg);
    color: var(--text-color);
    border: 2px solid var(--input-border);
    transition: all 0.3s ease;
    outline: none;
}

input[type="text"]:focus, 
input[type="number"]:focus {
    background: var(--input-focus-bg);
    border-color: var(--input-focus-border);
    box-shadow: 0 0 20px var(--input-focus-border),
                inset 0 2px 5px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

input[type="text"]::placeholder, 
input[type="number"]::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

input[type="submit"] {
    padding: 1.2rem;
    border: none;
    border-radius: 12px;
    background: var(--button-bg);
    color: var(--text-color);
    font-size: 1.3rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 5px 15px var(--input-focus-border);
}

input[type="submit"]:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px var(--input-focus-border);
    background: var(--button-hover-bg);
}

input[type="submit"]:active {
    transform: translateY(-1px);
    box-shadow: 0 5px 15px var(--input-focus-border);
}

.result {
    margin-top: 2rem;
    font-size: 1.1rem;
    background: var(--result-bg);
    padding: 2rem;
    border-radius: 15px;
    line-height: 1.7;
    border: 2px solid var(--result-border);
    text-align: left;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.2),
                0 5px 20px var(--result-border);
}

.result.show {
    opacity: 1;
    transform: translateY(0);
}

.result-section {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: var(--result-section-bg);
    border-radius: 10px;
    border-left: 4px solid var(--result-section-border);
    transition: all 0.3s ease;
}

.result-title {
    color: var(--result-title-color);
    font-weight: bold;
    font-size: 1.2rem;
    margin-bottom: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.zodiac {
    font-size: 1.4rem;
    color: var(--zodiac-color);
    font-weight: bold;
    text-shadow: 0 2px 5px var(--zodiac-color);
}

.date-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr 2fr;
    gap: 0.8rem;
}

/* Animated stars background */
.stars {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.star {
    position: absolute;
    background: var(--star-color);
    border-radius: 50%;
    animation: twinkle 3s infinite ease-in-out;
}

.star::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 2px;
    background: var(--star-color);
    border-radius: 1px;
}

.star::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(90deg);
    width: 100%;
    height: 2px;
    background: var(--star-color);
    border-radius: 1px;
}

@keyframes twinkle {
    0%, 100% { 
        opacity: 0.3; 
        transform: scale(1) rotate(0deg);
    }
    50% { 
        opacity: 1; 
        transform: scale(1.3) rotate(180deg);
    }
}

/* Dark Mode Toggle Button */
.theme-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
}

.theme-btn {
    background: var(--container-bg);
    border: 2px solid var(--container-border);
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.theme-btn:hover {
    transform: scale(1.1) rotate(10deg);
    box-shadow: 0 10px 25px var(--input-focus-border);
}

.theme-icon {
    font-size: 1.5rem;
    transition: all 0.3s ease;
}

.theme-btn:hover .theme-icon {
    transform: rotate(20deg);
}

/* Floating particles effect */
.container::after {
    content: '';
    position: absolute;
    top: -50px;
    left: -50px;
    right: -50px;
    bottom: -50px;
    background: radial-gradient(circle, transparent 30%, var(--container-border) 70%);
    border-radius: 50px;
    z-index: -1;
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-10px) rotate(5deg); }
}

/* Smooth theme transition */
* {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* Responsive design */
@media (max-width: 480px) {
    .container {
        padding: 1.5rem;
        margin: 10px;
    }
    
    .container h1 {
        font-size: 2rem;
    }
    
    .date-inputs {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    input[type="submit"] {
        font-size: 1.1rem;
        padding: 1rem;
    }
    
    .result-section {
        padding: 0.8rem;
        margin-bottom: 1rem;
    }
    
    .result-title {
        font-size: 1rem;
    }
}

@media (max-width: 320px) {
    .container {
        padding: 1rem;
    }
    
    .container h1 {
        font-size: 1.8rem;
        margin-bottom: 1.5rem;
    }
}