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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    color: #e0e0e0;
    min-height: 100vh;
    padding: 2rem 1rem;
}

/* Language switcher */
.lang-switcher {
    display: flex;
    justify-content: center;
    gap: 0.3rem;
    margin-bottom: 1rem;
}

.lang-switcher button {
    padding: 0.25rem 0.5rem;
    font-size: 0.7rem;
    font-weight: 700;
    background: rgba(255,255,255,0.06);
    color: #667;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 4px;
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s;
}

.lang-switcher button:hover {
    color: #ccd;
    border-color: rgba(255,255,255,0.2);
    box-shadow: none;
    transform: none;
}

.lang-switcher button.active {
    color: #ffd200;
    border-color: rgba(255, 210, 0, 0.4);
    background: rgba(255, 210, 0, 0.1);
}

h1 {
    text-align: center;
    font-size: 2.2rem;
    margin-bottom: 0.3rem;
    background: linear-gradient(90deg, #f7971e, #ffd200);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    text-align: center;
    color: #8899aa;
    margin-bottom: 2rem;
    font-size: 1.05rem;
}

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

.input-section {
    background: rgba(255,255,255,0.06);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.08);
    transition: max-height 0.3s ease, opacity 0.3s ease, padding 0.3s ease, margin 0.3s ease;
    overflow: hidden;
}

.input-section.collapsed {
    max-height: 0;
    opacity: 0;
    padding: 0 2rem;
    margin-bottom: 0;
    border-color: transparent;
    pointer-events: none;
}

/* Date picker */
.picker-step label {
    display: block;
    font-size: 0.85rem;
    color: #aab;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.6rem;
}

.picker-back {
    padding: 0.2rem 0.5rem;
    font-size: 0.85rem;
    background: rgba(255,255,255,0.08);
    color: #aab;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 6px;
    cursor: pointer;
    vertical-align: middle;
    margin-right: 0.3rem;
}

.picker-back:hover {
    background: rgba(255,255,255,0.15);
    color: #ffd200;
    box-shadow: none;
    transform: none;
}

.picker-grid {
    display: grid;
    gap: 0.4rem;
}

.picker-grid-year {
    grid-template-columns: repeat(5, 1fr);
    max-height: 240px;
    overflow-y: auto;
}

.picker-decade-spacer {
    grid-column: 1 / -1;
    height: 0.4em;
}


.picker-grid-month {
    grid-template-columns: repeat(4, 1fr);
}

.picker-grid-day {
    grid-template-columns: repeat(7, 1fr);
}

.picker-btn {
    padding: 0.6rem 0.3rem;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.04);
    color: #ccd;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.picker-btn:hover {
    background: rgba(255, 210, 0, 0.15);
    color: #ffd200;
    border-color: rgba(255, 210, 0, 0.3);
    box-shadow: none;
    transform: none;
}

.picker-btn.picker-decade-0 { border-color: rgba(255, 210, 0, 0.2); color: #ffd200; }
.picker-btn.picker-decade-1 { border-color: rgba(72, 219, 251, 0.2); color: #48dbfb; }
.picker-btn.picker-decade-2 { border-color: rgba(255, 107, 107, 0.2); color: #ff6b6b; }
.picker-btn.picker-decade-3 { border-color: rgba(85, 239, 196, 0.2); color: #55efc4; }
.picker-btn.picker-decade-4 { border-color: rgba(255, 159, 243, 0.2); color: #ff9ff3; }

.picker-btn.picker-decade-0:hover { background: rgba(255, 210, 0, 0.15); border-color: rgba(255, 210, 0, 0.4); }
.picker-btn.picker-decade-1:hover { background: rgba(72, 219, 251, 0.15); border-color: rgba(72, 219, 251, 0.4); }
.picker-btn.picker-decade-2:hover { background: rgba(255, 107, 107, 0.15); border-color: rgba(255, 107, 107, 0.4); }
.picker-btn.picker-decade-3:hover { background: rgba(85, 239, 196, 0.15); border-color: rgba(85, 239, 196, 0.4); }
.picker-btn.picker-decade-4:hover { background: rgba(255, 159, 243, 0.15); border-color: rgba(255, 159, 243, 0.4); }

.picker-time-row {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.picker-time-row input {
    padding: 0.7rem 1rem;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.15);
    background: rgba(0,0,0,0.3);
    color: #fff;
    font-size: 1rem;
}

.picker-time-row input:focus {
    outline: none;
    border-color: #f7971e;
    box-shadow: 0 0 0 3px rgba(247, 151, 30, 0.2);
}

.reset-btn {
    margin-bottom: 1rem;
    padding: 0.5rem 1.5rem;
    font-size: 0.85rem;
    background: rgba(255,255,255,0.08);
    color: #aab;
    border: 1px solid rgba(255,255,255,0.15);
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.reset-btn:hover {
    background: rgba(255,255,255,0.14);
    color: #ffd200;
    box-shadow: none;
}

.input-row {
    display: flex;
    gap: 1rem;
    align-items: end;
    flex-wrap: wrap;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.field label {
    font-size: 0.85rem;
    color: #aab;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.field input {
    padding: 0.7rem 1rem;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.15);
    background: rgba(0,0,0,0.3);
    color: #fff;
    font-size: 1rem;
}

.field input:focus {
    outline: none;
    border-color: #f7971e;
    box-shadow: 0 0 0 3px rgba(247, 151, 30, 0.2);
}

button {
    padding: 0.7rem 2rem;
    border-radius: 8px;
    border: none;
    background: linear-gradient(135deg, #f7971e, #ffd200);
    color: #1a1a2e;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
}

button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(247, 151, 30, 0.4);
}

.time-hint {
    font-size: 0.8rem;
    color: #667;
    margin-top: 0.5rem;
}

#results {
    display: none;
}

.result-header {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: #ffd200;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* Toggle switch */
.toggle-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    color: #aab;
    user-select: none;
}

.toggle-label input {
    display: none;
}

.toggle-slider {
    width: 36px;
    height: 20px;
    background: rgba(255,255,255,0.15);
    border-radius: 10px;
    position: relative;
    transition: background 0.2s;
}

.toggle-slider::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    background: #667;
    border-radius: 50%;
    transition: transform 0.2s, background 0.2s;
}

.toggle-label input:checked + .toggle-slider {
    background: rgba(255, 210, 0, 0.3);
}

.toggle-label input:checked + .toggle-slider::after {
    transform: translateX(16px);
    background: #ffd200;
}

.toggle-text {
    white-space: nowrap;
}

.milestone {
    background: rgba(255,255,255,0.05);
    border-radius: 12px;
    padding: 1.2rem 1.5rem;
    margin-bottom: 0.8rem;
    border-left: 4px solid #f7971e;
    transition: transform 0.15s;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.milestone:hover {
    transform: translateX(4px);
}

.milestone.past {
    opacity: 0.6;
    border-left-color: #667;
}

.milestone.past .milestone-badge {
    background: #445;
}

.milestone.special {
    border-left-color: #ffd200;
    background: rgba(255, 210, 0, 0.06);
}

.milestone-star {
    color: #ffd200;
    font-size: 1.2rem;
    vertical-align: middle;
}

.milestone.past.special {
    border-left-color: #888;
}

.milestone-badge a {
    color: inherit;
    text-decoration: underline;
    text-decoration-style: dotted;
    text-underline-offset: 2px;
}

.milestone-badge a:hover {
    color: #fff;
    text-decoration-style: solid;
}

.milestone-main {
    flex: 1;
    min-width: 200px;
}

.milestone-number {
    font-size: 1.5rem;
    font-weight: 800;
    font-family: 'Courier New', monospace;
    color: #ffd200;
}

.milestone.past .milestone-number {
    color: #99a;
}

.milestone-unit {
    font-size: 0.95rem;
    color: #aab;
    margin-top: 0.15rem;
}

.milestone-explanation {
    font-size: 0.75rem;
    color: #667;
    font-style: italic;
}

.milestone-date {
    font-size: 0.95rem;
    color: #ccd;
    text-align: right;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.2rem;
}

.milestone-relative {
    font-size: 0.8rem;
    color: #889;
    margin-top: 0.2rem;
}

.milestone-badge {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    background: rgba(247, 151, 30, 0.25);
    color: #ffd200;
    margin-top: 0.3rem;
}

.section-label {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #667;
    margin: 1.5rem 0 0.8rem;
    padding-bottom: 0.3rem;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.load-more-btn {
    width: 100%;
    margin-top: 0.5rem;
    padding: 0.7rem;
    background: rgba(255,255,255,0.08);
    color: #aab;
    border: 1px dashed rgba(255,255,255,0.15);
    font-weight: 600;
}

.load-more-btn:hover {
    background: rgba(255,255,255,0.12);
    color: #ffd200;
    border-color: rgba(247, 151, 30, 0.4);
    box-shadow: none;
}

/* Live dashboard & countdown */
.dashboard {
    background: rgba(255,255,255,0.06);
    border-radius: 16px;
    padding: 1.5rem 2rem;
    margin-bottom: 1.5rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.08);
    display: none;
}

.dashboard-birthdate {
    text-align: center;
    font-size: 0.85rem;
    color: #889;
    margin-bottom: 0.5rem;
}

.dashboard-famous {
    text-align: center;
    font-size: 0.85rem;
    color: #889;
    margin-bottom: 0.8rem;
    padding-bottom: 0.8rem;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.dashboard-famous a {
    color: #ffd200;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.15s;
    cursor: pointer;
}

.dashboard-famous a:hover {
    color: #f7971e;
    text-decoration: underline;
}

.dashboard-age {
    font-family: 'Courier New', monospace;
    font-size: 1.1rem;
    color: #ffd200;
    text-align: center;
    margin-bottom: 1rem;
}

.dashboard-age span {
    font-weight: 800;
}

.dashboard-countdown {
    text-align: center;
    font-size: 0.95rem;
    color: #ccd;
    padding-top: 1rem;
    border-top: 1px solid rgba(255,255,255,0.06);
}

.dashboard-countdown .countdown-time {
    font-family: 'Courier New', monospace;
    font-size: 1.3rem;
    font-weight: 800;
    color: #f7971e;
}

.dashboard-countdown .countdown-target {
    font-weight: 700;
    color: #ffd200;
}

/* Milestone action buttons */
.milestone-actions {
    display: flex;
    gap: 0.2rem;
    justify-content: flex-end;
}

.milestone-actions button {
    background: none;
    border: none;
    padding: 0.3rem;
    font-size: 1.1rem;
    cursor: pointer;
    opacity: 0.45;
    transition: opacity 0.15s, transform 0.15s;
    line-height: 1;
}

.milestone-actions button:hover {
    opacity: 1;
    transform: translateY(-1px);
    box-shadow: none;
}

.copied-toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(247, 151, 30, 0.95);
    color: #1a1a2e;
    padding: 0.6rem 1.5rem;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.9rem;
    z-index: 10000;
    animation: toastIn 0.3s ease, toastOut 0.3s ease 1.5s forwards;
}

@keyframes toastIn { from { opacity: 0; transform: translateX(-50%) translateY(10px); } to { opacity: 1; transform: translateX(-50%) translateY(0); } }
@keyframes toastOut { from { opacity: 1; } to { opacity: 0; } }

/* Confetti */
.confetti-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none;
    z-index: 9999;
    overflow: hidden;
}

.confetti-piece {
    position: absolute;
    top: -20px;
    width: 10px;
    height: 10px;
    opacity: 0.9;
    animation: confettiFall linear forwards;
}

@keyframes confettiFall {
    0%   { transform: translateY(0) rotate(0deg); opacity: 1; }
    100% { transform: translateY(110vh) rotate(720deg); opacity: 0; }
}

/* Toggle group */
.toggle-group {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Subscribe button in dashboard */
.dashboard-subscribe {
    text-align: center;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255,255,255,0.06);
}

.subscribe-btn {
    padding: 0.5rem 1.5rem;
    font-size: 0.85rem;
    background: rgba(255,255,255,0.08);
    color: #ffd200;
    border: 1px solid rgba(255, 210, 0, 0.3);
}

.subscribe-btn:hover {
    background: rgba(255, 210, 0, 0.15);
    box-shadow: none;
}

/* Modal */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.6);
    z-index: 10000;
    justify-content: center;
    align-items: center;
    padding: 1rem;
}

.modal {
    background: #1a1a2e;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 16px;
    padding: 2rem;
    max-width: 500px;
    width: 100%;
}

.modal {
    position: relative;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    color: #667;
    font-size: 1.5rem;
    line-height: 1;
    padding: 0.2rem 0.4rem;
    cursor: pointer;
    transition: color 0.15s;
}

.modal-close:hover {
    color: #fff;
    transform: none;
    box-shadow: none;
}

.modal h3 {
    color: #ffd200;
    margin-bottom: 0.5rem;
}

.modal-desc {
    color: #889;
    font-size: 0.85rem;
    margin-bottom: 1.2rem;
}

.modal .field {
    margin-bottom: 1.2rem;
}

.modal-toggle {
    margin-bottom: 1.2rem;
}

.modal-buttons-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.8rem;
}

.modal-platform-btn {
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
    padding: 1rem 0.5rem;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    color: #ccd;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, transform 0.15s;
}

.modal-platform-btn:hover {
    background: rgba(255, 210, 0, 0.1);
    border-color: rgba(255, 210, 0, 0.3);
    color: #ffd200;
    transform: translateY(-1px);
    box-shadow: none;
}

.platform-icon {
    font-size: 1.5rem;
    line-height: 1;
    margin-bottom: 0.2rem;
}

.platform-name {
    font-size: 0.9rem;
    font-weight: 700;
}

.platform-desc {
    font-size: 0.7rem;
    color: #667;
    font-weight: 400;
}

.modal-url {
    margin-top: 1rem;
    font-size: 0.7rem;
    color: #556;
    word-break: break-all;
    font-family: 'Courier New', monospace;
}

.privacy {
    text-align: center;
    color: #556;
    font-size: 0.75rem;
    margin-top: 3rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255,255,255,0.04);
}

@media (max-width: 600px) {
    h1 { font-size: 1.6rem; }
    .milestone { flex-direction: column; align-items: flex-start; }
    .milestone-date { text-align: left; align-items: flex-start; }
    .dashboard-age { font-size: 0.9rem; }
    .dashboard-countdown .countdown-time { font-size: 1.1rem; }
    .picker-grid-year { grid-template-columns: repeat(4, 1fr); }
    .picker-btn { padding: 0.7rem 0.2rem; font-size: 1rem; }
    .modal-buttons-grid { grid-template-columns: 1fr; }
}
