:root {
    --bg-color: #0f172a;
    --text-main: #f8fafc;
    --text-muted: #cbd5e1;
    --primary: #d946ef;
    --primary-hover: #c026d3;
    --danger: #ef4444;
    --glass-bg: rgba(10, 10, 10, 0.75);
    --glass-border: rgba(217, 70, 239, 0.3);
    --input-bg: rgba(0, 0, 0, 0.6);
    --accent: #39ff14;
}

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

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(rgba(10, 10, 10, 0.6), rgba(10, 10, 10, 0.8)), url('alice.jpeg') no-repeat center center fixed;
    background-size: cover;
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow-x: hidden;
    padding: 20px;
}

.background-orbs {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.5;
    animation: float 10s infinite alternate ease-in-out;
}

.orb-1 {
    width: 400px;
    height: 400px;
    background: #d946ef;
    top: -100px;
    left: -100px;
}

.orb-2 {
    width: 500px;
    height: 500px;
    background: #39ff14;
    bottom: -150px;
    right: -100px;
    animation-delay: -5s;
}

.orb-3 {
    width: 300px;
    height: 300px;
    background: #06b6d4;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: -2s;
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(50px, 50px) scale(1.1); }
}

.container {
    width: 100%;
    max-width: 600px;
    z-index: 1;
}

.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
}

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

.header h1 {
    font-family: 'Sedgwick Ave Display', cursive;
    font-size: 3.5rem;
    font-weight: normal;
    margin-bottom: 8px;
    background: linear-gradient(135deg, #d946ef, #39ff14);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-transform: uppercase;
    text-shadow: 2px 2px 10px rgba(217, 70, 239, 0.3);
    letter-spacing: 2px;
}

.header p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.form-group {
    margin-bottom: 24px;
}

.input-row {
    display: flex;
    gap: 20px;
}

.input-col {
    flex: 1;
}

label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 1px;
}

input {
    width: 100%;
    background: var(--input-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-main);
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
}

input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 10px rgba(57, 255, 20, 0.4);
}

input::placeholder {
    color: rgba(148, 163, 184, 0.5);
}

.error-message {
    color: var(--danger);
    font-size: 0.8rem;
    margin-top: 6px;
    display: none;
}

input.invalid {
    border-color: var(--danger);
}

.children-section {
    margin-top: 30px;
    margin-bottom: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--glass-border);
}

.children-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.children-header h3 {
    font-family: 'Sedgwick Ave Display', cursive;
    font-size: 1.8rem;
    font-weight: normal;
    color: #d946ef;
    letter-spacing: 1px;
}

.btn-icon {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(217, 70, 239, 0.3);
    color: var(--text-main);
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
}

.btn-icon:hover {
    background: rgba(217, 70, 239, 0.2);
}

.btn-icon:active {
    transform: scale(0.95);
}

.child-row {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    align-items: flex-end;
    animation: slideIn 0.3s ease-out;
}

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

.remove-child {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
    border: 1px solid rgba(239, 68, 68, 0.2);
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
}

.remove-child:hover {
    background: var(--danger);
    color: white;
}

.btn-primary {
    width: 100%;
    background: linear-gradient(45deg, #d946ef, #8b5cf6);
    color: white;
    border: none;
    padding: 14px;
    border-radius: 10px;
    font-size: 1.2rem;
    font-family: 'Sedgwick Ave Display', cursive;
    letter-spacing: 2px;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.3s, transform 0.1s, box-shadow 0.3s;
    box-shadow: 0 4px 15px rgba(217, 70, 239, 0.4);
}

.btn-primary:hover {
    background: linear-gradient(45deg, #c026d3, #7c3aed);
    box-shadow: 0 10px 20px rgba(217, 70, 239, 0.6);
}

.btn-primary:active {
    transform: scale(0.98);
}

.btn-secondary {
    width: 100%;
    background: transparent;
    color: var(--text-main);
    border: 1px solid var(--glass-border);
    padding: 14px;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    padding: 20px;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal {
    width: 100%;
    max-width: 500px;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.modal-overlay.active .modal {
    transform: translateY(0);
}

.modal h2 {
    font-family: 'Sedgwick Ave Display', cursive;
    font-size: 2.5rem;
    color: #39ff14;
    letter-spacing: 1px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 15px;
}

.summary-content {
    margin-bottom: 30px;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    border-bottom: 1px dashed rgba(217, 70, 239, 0.3);
    padding-bottom: 8px;
}

.summary-label {
    color: var(--text-muted);
}

.summary-value {
    font-weight: 500;
}

.summary-children {
    margin-top: 15px;
    background: rgba(0, 0, 0, 0.4);
    padding: 15px;
    border-radius: 8px;
    border: 1px solid var(--glass-border);
}

.summary-children h4 {
    font-size: 0.9rem;
    margin-bottom: 10px;
    color: var(--accent);
    text-transform: uppercase;
}

.summary-child-item {
    font-size: 0.9rem;
    margin-bottom: 5px;
    color: var(--text-main);
}

.modal-actions {
    display: flex;
    gap: 15px;
}

.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: #d946ef;
    color: white;
    padding: 12px 24px;
    border-radius: 30px;
    font-weight: 500;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
    transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    z-index: 1000;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
}

@media (max-width: 600px) {
    .glass-panel {
        padding: 24px;
    }
    .input-row {
        flex-direction: column;
        gap: 0;
    }
    .input-col {
        margin-bottom: 15px;
    }
    .child-row {
        flex-wrap: wrap;
    }
    .child-row .input-col {
        flex: 1 1 calc(50% - 10px);
        margin-bottom: 0;
    }
    .remove-child {
        margin-top: 25px;
    }
}
