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

:root {
    --primary-color: #6366f1;
    --primary-hover: #4f46e5;
    --secondary-color: #8b5cf6;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --background: #0f172a;
    --surface: #1e293b;
    --surface-light: #334155;
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --border-color: #475569;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.4);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: var(--text-primary);
    min-height: 100vh;
    padding: 20px;
    line-height: 1.6;
}

.container {
    max-width: 900px;
    margin: 0 auto;
}

header {
    text-align: center;
    padding: 40px 20px;
}

h1 {
    font-size: 3.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #ec4899 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
}

.tagline {
    font-size: 1.25rem;
    color: var(--text-secondary);
    font-weight: 300;
}

.card {
    background: var(--surface);
    border-radius: 20px;
    padding: 40px;
    margin-bottom: 30px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.card h2 {
    font-size: 1.75rem;
    margin-bottom: 30px;
    color: var(--text-primary);
}

.date-selector {
    display: flex;
    gap: 15px;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.date-selector label {
    font-weight: 600;
    color: var(--text-secondary);
    min-width: 100px;
}

#startDate {
    flex: 1;
    min-width: 200px;
    padding: 12px 16px;
    border-radius: 10px;
    border: 2px solid var(--border-color);
    background: var(--surface-light);
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.3s;
}

#startDate:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.subscription-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    border: none;
    padding: 30px 20px;
    border-radius: 15px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4);
}

.btn-primary:active {
    transform: translateY(-1px);
}

.btn-icon {
    font-size: 2rem;
}

.btn-text {
    font-size: 1.3rem;
}

.btn-subtext {
    font-size: 0.9rem;
    opacity: 0.9;
    font-weight: 400;
}

.btn-secondary {
    background: var(--surface-light);
    color: var(--text-primary);
    border: 2px solid var(--border-color);
    padding: 12px 24px;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-secondary:hover {
    background: var(--border-color);
    border-color: var(--text-muted);
}

.custom-duration {
    border-top: 1px solid var(--border-color);
    padding-top: 30px;
}

.custom-duration label {
    display: block;
    margin-bottom: 15px;
    font-weight: 600;
    color: var(--text-secondary);
}

.custom-input-group {
    display: flex;
    gap: 15px;
}

#customDays {
    flex: 1;
    padding: 12px 16px;
    border-radius: 10px;
    border: 2px solid var(--border-color);
    background: var(--surface-light);
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.3s;
}

#customDays:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.result-card {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
    border: 2px solid var(--primary-color);
    border-radius: 20px;
    padding: 40px;
    margin-bottom: 30px;
    box-shadow: var(--shadow-lg);
    animation: slideIn 0.5s ease-out;
}

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

.result-header h3 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: var(--text-secondary);
    text-align: center;
}

.result-content {
    text-align: center;
    margin-bottom: 30px;
}

.end-date {
    font-size: 3rem;
    font-weight: 800;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #ec4899 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 15px;
}

.duration-info {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.days-count {
    font-size: 1rem;
    color: var(--text-muted);
}

.timeline {
    margin: 30px 0;
}

.timeline-bar {
    height: 8px;
    background: var(--surface-light);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 10px;
}

.timeline-progress {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    width: 0%;
    border-radius: 10px;
    animation: progress 1s ease-out forwards;
}

@keyframes progress {
    to {
        width: 100%;
    }
}

.timeline-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.result-actions {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
}

.info-section {
    margin-top: 40px;
}

.info-section h3 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    text-align: center;
}

.info-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.info-card {
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: 15px;
    padding: 30px;
    text-align: center;
    transition: all 0.3s;
}

.info-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.2);
}

.info-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.info-card h4 {
    font-size: 1.25rem;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.info-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.5;
}

footer {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.notification {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--success-color);
    color: white;
    padding: 16px 24px;
    border-radius: 10px;
    box-shadow: var(--shadow);
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s;
    pointer-events: none;
    z-index: 1000;
}

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

@media (max-width: 768px) {
    h1 {
        font-size: 2.5rem;
    }

    .card {
        padding: 25px;
    }

    .date-selector {
        flex-direction: column;
        align-items: stretch;
    }

    .date-selector label {
        min-width: auto;
    }

    .subscription-buttons {
        grid-template-columns: 1fr;
    }

    .end-date {
        font-size: 2rem;
    }

    .result-actions {
        flex-direction: column;
    }

    .result-actions button {
        width: 100%;
    }

    .notification {
        left: 20px;
        right: 20px;
        bottom: 20px;
    }
}

/* Dark mode input color fix for some browsers */
input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(1);
}

input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    opacity: 1;
}

