:root {
    --portal-orange: #FF8C00;
    --portal-yellow: #FFD700;
    --portal-blue: #1E3A8A;
    --portal-light-blue: #3B82F6;
}

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

html {
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background: linear-gradient(135deg, #FFE5B4 0%, #FFD700 50%, #FF8C00 100%);
    min-height: 100vh;
    padding: 20px;
    position: relative;
    overflow-x: hidden;
}

.welcome-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: linear-gradient(135deg, #FFF8DC 0%, #FFE5B4 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    transition: opacity 0.5s ease;
}

.welcome-screen.fade-out {
    opacity: 0;
    pointer-events: none;
}

.welcome-content {
    text-align: center;
    z-index: 10;
    animation: fadeIn 1s ease;
}

.mascot-logo {
    max-width: 500px;
    width: 90%;
    height: auto;
    margin-bottom: 30px;
    animation: float 3s ease-in-out infinite;
    filter: drop-shadow(0 10px 30px rgba(255, 140, 0, 0.3));
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

.welcome-title {
    font-size: 48px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--portal-orange), var(--portal-blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    -moz-background-clip: text;
    -moz-text-fill-color: transparent;
    margin-bottom: 20px;
}

.welcome-subtitle {
    font-size: 20px;
    color: #333;
    margin-bottom: 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.portal-button {
    background: linear-gradient(135deg, var(--portal-orange), var(--portal-yellow));
    color: white;
    border: none;
    padding: 20px 50px;
    font-size: 24px;
    font-weight: 700;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(255, 140, 0, 0.4);
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 15px;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    -webkit-user-select: none;
}

.portal-button:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 15px 40px rgba(255, 140, 0, 0.6);
}

.portal-button:active {
    transform: translateY(-2px) scale(1.02);
}

.portal-button-icon {
    font-size: 28px;
    animation: sparkle 1.5s ease-in-out infinite;
}

@keyframes sparkle {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.2) rotate(180deg); }
}

.portal-circle {
    position: absolute;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,215,0,0.3), transparent);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: pulse 3s ease-in-out infinite;
    pointer-events: none;
}

@keyframes pulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.5; }
    50% { transform: translate(-50%, -50%) scale(1.2); opacity: 0.3; }
}

.portal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.95);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.portal-overlay.active {
    display: flex;
    animation: overlayFadeIn 0.5s ease;
}

@keyframes overlayFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.portal-animation {
    position: relative;
    width: 400px;
    height: 400px;
}

.portal-ring {
    position: absolute;
    border-radius: 50%;
    border: 3px solid;
    animation: portalSpin 2s linear infinite;
}

.ring-1 {
    width: 100%;
    height: 100%;
    border-color: var(--portal-orange);
    animation: portalSpin 2s linear infinite;
}

.ring-2 {
    width: 70%;
    height: 70%;
    top: 15%;
    left: 15%;
    border-color: var(--portal-yellow);
    animation: portalSpin 2s linear infinite reverse;
}

.ring-3 {
    width: 40%;
    height: 40%;
    top: 30%;
    left: 30%;
    border-color: var(--portal-light-blue);
    animation: portalSpin 2s linear infinite;
}

.portal-center {
    position: absolute;
    width: 20%;
    height: 20%;
    top: 40%;
    left: 40%;
    border-radius: 50%;
    background: radial-gradient(circle, var(--portal-yellow), var(--portal-orange));
    animation: portalGlow 1s ease-in-out infinite alternate;
    box-shadow: 0 0 50px var(--portal-yellow);
}

@keyframes portalSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes portalGlow {
    from { box-shadow: 0 0 30px var(--portal-yellow); }
    to { box-shadow: 0 0 60px var(--portal-orange); }
}

.container {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

header {
    background: linear-gradient(135deg, var(--portal-orange) 0%, var(--portal-blue) 100%);
    color: white;
    padding: 40px;
    text-align: center;
}

header h1 {
    font-size: 32px;
    margin-bottom: 10px;
}

.subtitle {
    font-size: 16px;
    opacity: 0.9;
}

.progress-bar {
    display: flex;
    justify-content: space-between;
    padding: 30px 40px;
    background: #f8f9fa;
    border-bottom: 2px solid #e9ecef;
}

.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    position: relative;
    opacity: 0.5;
    transition: opacity 0.3s;
}

.progress-step.active {
    opacity: 1;
}

.progress-step::after {
    content: '';
    position: absolute;
    top: 20px;
    left: 50%;
    width: 100%;
    height: 2px;
    background: #dee2e6;
    z-index: -1;
}

.progress-step:last-child::after {
    display: none;
}

.progress-step.active::after {
    background: var(--portal-orange);
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #dee2e6;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-bottom: 8px;
    transition: background 0.3s;
}

.progress-step.active .step-number {
    background: linear-gradient(135deg, var(--portal-orange), var(--portal-yellow));
    color: white;
}

.step-label {
    font-size: 12px;
    text-align: center;
}

form {
    padding: 40px;
}

.form-step {
    display: none;
}

.form-step.active {
    display: block;
    animation: fadeIn 0.3s;
}

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

h2 {
    color: #333;
    margin-bottom: 30px;
    font-size: 24px;
}

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

.form-row {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 15px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="date"],
input[type="number"],
select,
textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    font-family: inherit;
}

select {
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 20px;
    padding-right: 40px;
    cursor: pointer;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--portal-orange);
}

small {
    display: block;
    margin-top: 5px;
    color: #6c757d;
    font-size: 14px;
}

.checkbox-group {
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    font-weight: normal;
    cursor: pointer;
}

.checkbox-group input[type="checkbox"] {
    width: auto;
    margin-right: 10px;
    cursor: pointer;
    transform: scale(1.5);
    -webkit-appearance: checkbox;
    -moz-appearance: checkbox;
    appearance: checkbox;
}

.button-group {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    margin-top: 30px;
}

.btn {
    padding: 12px 30px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    -webkit-user-select: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--portal-orange), var(--portal-yellow));
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #E67E00, #FFC700);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 140, 0, 0.4);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-success {
    background: #28a745;
    color: white;
}

.btn-success:hover {
    background: #218838;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(40, 167, 69, 0.4);
}

.result {
    padding: 40px;
}

.result-content {
    text-align: center;
    padding: 40px;
    border-radius: 12px;
    background: #f8f9fa;
}

.result-content h2 {
    margin-bottom: 20px;
    font-size: 28px;
}

.qualified {
    color: #28a745;
}

.not-qualified {
    color: #dc3545;
}

.result-details {
    margin: 20px 0;
    padding: 20px;
    background: white;
    border-radius: 8px;
    text-align: left;
}

.result-details p {
    margin: 10px 0;
    line-height: 1.6;
}

.disqualification-reasons {
    margin-top: 20px;
    padding: 15px;
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    border-radius: 4px;
}

.disqualification-reasons h3 {
    color: #856404;
    margin-bottom: 10px;
    font-size: 18px;
}

.disqualification-reasons ul {
    list-style-position: inside;
    color: #856404;
}

.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.disclaimer {
    background: #fff3cd;
    border-left: 4px solid var(--portal-orange);
    padding: 15px;
    margin: 20px 0;
    border-radius: 8px;
    font-size: 14px;
    color: #856404;
}

.scheduler-container {
    background: white;
    padding: 25px;
    border-radius: 12px;
    margin-top: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.time-slots {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
    margin-top: 15px;
}

.time-slot {
    padding: 12px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 600;
}

.time-slot.available {
    background: white;
    color: #333;
    border-color: var(--portal-orange);
}

.time-slot.available:hover {
    background: linear-gradient(135deg, var(--portal-orange), var(--portal-yellow));
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 140, 0, 0.3);
}

.time-slot.selected {
    background: linear-gradient(135deg, var(--portal-orange), var(--portal-yellow));
    color: white;
    border-color: var(--portal-orange);
    box-shadow: 0 4px 12px rgba(255, 140, 0, 0.4);
}

.time-slot.unavailable {
    background: #f8f9fa;
    color: #adb5bd;
    border-color: #dee2e6;
    cursor: not-allowed;
    opacity: 0.6;
}

#appointmentDate {
    max-width: 300px;
}

@media (max-width: 768px) {
    .welcome-title {
        font-size: 32px;
    }

    .welcome-subtitle {
        font-size: 16px;
        padding: 0 20px;
    }

    .mascot-logo {
        max-width: 300px;
    }

    .portal-button {
        font-size: 18px;
        padding: 15px 35px;
    }

    .portal-animation {
        width: 300px;
        height: 300px;
    }

    .container {
        border-radius: 0;
    }

    header {
        padding: 30px 20px;
    }

    header h1 {
        font-size: 24px;
    }

    .progress-bar {
        padding: 20px 10px;
    }

    .step-label {
        font-size: 10px;
    }

    form {
        padding: 20px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .button-group {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }
}