/* ===== CSS Variables & Base ===== */
:root {
    --primary: #6366f1;
    --primary-light: #818cf8;
    --primary-dark: #4f46e5;
    --accent: #f472b6;
    --accent-light: #f9a8d4;
    --bg-dark: #0f0f23;
    --bg-card: rgba(255, 255, 255, 0.05);
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --text-muted: rgba(255, 255, 255, 0.5);
    --border-color: rgba(255, 255, 255, 0.1);
    --shadow-glow: 0 0 60px rgba(99, 102, 241, 0.3);
    --font-main: 'Outfit', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    background: var(--bg-dark);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* ===== Background Animation ===== */
.background-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.6;
    animation: float 20s ease-in-out infinite;
}

.orb-1 {
    width: 600px;
    height: 600px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    top: -200px;
    right: -200px;
    animation-delay: 0s;
}

.orb-2 {
    width: 400px;
    height: 400px;
    background: linear-gradient(135deg, var(--accent) 0%, var(--primary-light) 100%);
    bottom: -100px;
    left: -100px;
    animation-delay: -7s;
}

.orb-3 {
    width: 300px;
    height: 300px;
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--accent-light) 100%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: -14s;
}

@keyframes float {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    25% {
        transform: translate(50px, -50px) scale(1.1);
    }

    50% {
        transform: translate(-30px, 30px) scale(0.95);
    }

    75% {
        transform: translate(-50px, -20px) scale(1.05);
    }
}

/* ===== Glass Card ===== */
.glass-card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    box-shadow: var(--shadow-glow);
}

/* ===== Container & Layout ===== */
.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: calc(100vh - 60px);
}

/* ===== Header ===== */
.header {
    text-align: center;
    margin-bottom: 50px;
    animation: fadeInDown 0.8s ease-out;
}

.title {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 800;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--primary-light) 50%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 10px;
}

.title-icon {
    font-size: 0.8em;
    -webkit-text-fill-color: initial;
}

.subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    font-weight: 300;
}

/* ===== Countdown Section ===== */
.countdown-section {
    width: 100%;
    margin-bottom: 40px;
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.countdown-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    padding: 40px 30px;
    margin-bottom: 20px;
}

.countdown-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 80px;
}

.countdown-value {
    font-size: clamp(2.5rem, 8vw, 5rem);
    font-weight: 700;
    background: linear-gradient(180deg, var(--text-primary) 0%, var(--primary-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    transition: transform 0.3s ease;
}

.countdown-value:hover {
    transform: scale(1.1);
}

.countdown-label {
    font-size: 0.9rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-top: 8px;
    font-weight: 400;
}

.countdown-separator {
    font-size: clamp(2rem, 6vw, 4rem);
    font-weight: 300;
    color: var(--primary-light);
    opacity: 0.5;
    animation: pulse 1s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 0.5;
    }

    50% {
        opacity: 1;
    }
}

.target-info {
    text-align: center;
    padding: 15px;
}

.target-label {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 5px;
}

.target-date {
    font-size: 1.2rem;
    color: var(--accent-light);
    font-weight: 600;
}

/* ===== Quote Section ===== */
.quote-section {
    width: 100%;
    padding: 40px;
    text-align: center;
    margin-bottom: 40px;
    animation: fadeInUp 0.8s ease-out 0.4s both;
    position: relative;
    overflow: hidden;
}

.quote-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--accent), var(--primary));
    background-size: 200% 100%;
    animation: shimmer 3s linear infinite;
}

@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

.quote-icon {
    font-size: 3rem;
    margin-bottom: 20px;
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

.quote-text {
    font-size: clamp(1.2rem, 3vw, 1.6rem);
    line-height: 1.6;
    color: var(--text-primary);
    font-weight: 400;
    font-style: italic;
    margin-bottom: 20px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.quote-author {
    font-size: 1rem;
    color: var(--accent-light);
    font-weight: 600;
}

/* ===== Settings ===== */
.settings-section {
    animation: fadeInUp 0.8s ease-out 0.6s both;
}

.settings-btn {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(244, 114, 182, 0.2));
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--text-primary);
    padding: 14px 28px;
    border-radius: 16px;
    font-family: var(--font-main);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    align-items: center;
    gap: 10px;
    backdrop-filter: blur(10px);
}

.settings-btn .btn-icon {
    font-size: 1.2em;
}

.settings-btn:hover {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.4), rgba(244, 114, 182, 0.4));
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 15px 40px rgba(99, 102, 241, 0.3);
}

.settings-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 15, 35, 0.95);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding-top: 5vh;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
    overflow-y: auto;
}

.settings-modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    padding: 35px;
    max-width: 420px;
    width: 92%;
    text-align: center;
    transform: scale(0.9) translateY(20px);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    background: linear-gradient(145deg, rgba(30, 30, 60, 0.9), rgba(20, 20, 45, 0.95));
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.settings-modal.active .modal-content {
    transform: scale(1) translateY(0);
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 18px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: var(--text-secondary);
    font-size: 1.8rem;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.modal-close:hover {
    background: rgba(244, 114, 182, 0.3);
    color: var(--accent);
    transform: rotate(90deg);
}

.modal-header {
    margin-bottom: 25px;
}

.modal-icon {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 12px;
}

.modal-content h3 {
    font-size: 1.6rem;
    margin-bottom: 8px;
    background: linear-gradient(135deg, #fff 0%, var(--primary-light) 50%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.modal-subtitle {
    font-size: 0.95rem;
    color: var(--text-muted);
}

/* Quick Presets */
.quick-presets {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-bottom: 20px;
}

.preset-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    padding: 10px 18px;
    border-radius: 25px;
    font-family: var(--font-main);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.preset-btn:hover {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-color: transparent;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4);
}

.preset-btn.active {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-color: transparent;
    color: white;
}

/* Divider */
.divider {
    display: flex;
    align-items: center;
    margin: 20px 0;
    gap: 15px;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
}

.divider span {
    color: var(--text-muted);
    font-size: 0.85rem;
    white-space: nowrap;
}

/* Date Inputs */
.date-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 25px;
}

.input-group {
    text-align: left;
}

.input-group label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
    font-weight: 500;
}

.styled-input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    font-family: var(--font-main);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.styled-input:focus {
    outline: none;
    border-color: var(--primary-light);
    background: rgba(99, 102, 241, 0.1);
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.2);
}

.styled-input::-webkit-calendar-picker-indicator {
    filter: invert(1);
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.3s;
}

.styled-input::-webkit-calendar-picker-indicator:hover {
    opacity: 1;
}

/* Modal Buttons */
.modal-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.btn {
    padding: 14px 32px;
    border: none;
    border-radius: 14px;
    font-family: var(--font-main);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, #7c3aed 50%, var(--accent) 100%);
    background-size: 200% 200%;
    color: white;
    animation: gradientShift 3s ease infinite;
}

@keyframes gradientShift {

    0%,
    100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

.btn-primary:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 15px 35px rgba(99, 102, 241, 0.5);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--text-secondary);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
    color: var(--text-primary);
}

/* ===== Footer ===== */
.footer {
    text-align: center;
    padding: 20px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* ===== Animations ===== */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .container {
        padding: 30px 15px;
        padding-bottom: 100px;
        /* Space for floating button */
    }

    .countdown-container {
        gap: 5px;
        padding: 30px 15px;
    }

    .countdown-item {
        min-width: 60px;
    }

    .countdown-separator {
        font-size: 1.5rem;
    }

    .quote-section {
        padding: 30px 20px;
    }

    .orb-1 {
        width: 400px;
        height: 400px;
    }

    .orb-2 {
        width: 300px;
        height: 300px;
    }

    .orb-3 {
        width: 200px;
        height: 200px;
    }

    /* Floating settings button on mobile */
    .settings-section {
        position: fixed;
        bottom: 20px;
        left: 50%;
        transform: translateX(-50%);
        z-index: 100;
        animation: none;
    }

    .settings-btn {
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
        padding: 16px 24px;
    }

    /* Modal adjustments for mobile */
    .settings-modal {
        padding: 0;
        align-items: center;
    }

    .modal-content {
        max-height: 85vh;
        overflow-y: auto;
        padding: 25px 20px;
        padding-bottom: 30px;
        width: 95%;
        margin: auto;
        border-radius: 20px;
    }

    .modal-header {
        margin-bottom: 15px;
    }

    .modal-icon {
        font-size: 1.8rem;
        margin-bottom: 8px;
    }

    .modal-content h3 {
        font-size: 1.2rem;
    }

    .modal-subtitle {
        font-size: 0.85rem;
    }

    .quick-presets {
        gap: 6px;
        margin-bottom: 15px;
    }

    .preset-btn {
        padding: 8px 12px;
        font-size: 0.8rem;
    }

    .divider {
        margin: 12px 0;
    }

    .date-inputs {
        grid-template-columns: 1fr;
        gap: 10px;
        margin-bottom: 15px;
    }

    .input-group label {
        font-size: 0.8rem;
        margin-bottom: 5px;
    }

    .styled-input {
        padding: 10px 12px;
        font-size: 0.9rem;
    }

    .modal-buttons {
        flex-direction: column;
        gap: 8px;
        margin-top: 5px;
    }

    .btn {
        width: 100%;
        justify-content: center;
        padding: 12px 20px;
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    .countdown-item {
        min-width: 45px;
    }

    .countdown-value {
        font-size: 2rem;
    }

    .countdown-label {
        font-size: 0.65rem;
        letter-spacing: 1px;
    }

    .title {
        font-size: 1.8rem;
    }

    .quote-text {
        font-size: 1rem;
    }

    .preset-btn {
        padding: 7px 12px;
        font-size: 0.8rem;
    }

    .settings-btn {
        padding: 14px 20px;
        font-size: 0.9rem;
    }
}