body {
    margin: 0;
    min-height: 100vh;
    background: linear-gradient(135deg, #f4f7fe 0%, #eef2fa 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Inter', 'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
    padding: 1.5rem;
}

.role-selection-container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    animation: fadeSlideUp 0.6s cubic-bezier(0.2, 0.9, 0.4, 1.1) forwards;
}

@keyframes fadeSlideUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.selection-header {
    text-align: center;
    margin-bottom: 3.5rem;
}
.selection-header .badge-icon {
    display: inline-flex;
    background: rgba(67, 24, 255, 0.1);
    backdrop-filter: blur(4px);
    padding: 0.8rem 1.5rem;
    border-radius: 80px;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.3px;
    color: var(--brand-blue, #4318FF);
    border: 1px solid rgba(67, 24, 255, 0.2);
    margin-bottom: 1.2rem;
}
.selection-header h1 {
    font-size: 2.8rem;
    font-weight: 800;
    background: linear-gradient(125deg, #1B2559 0%, #4318FF 100%);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}
.selection-header p {
    font-size: 1.1rem;
    color: var(--text-muted, #5a6e9a);
    max-width: 550px;
    margin: 0 auto;
}

.role-card {
    background: var(--bg-card, #ffffff);
    border-radius: 2rem;
    box-shadow: 0 20px 35px -12px rgba(0, 0, 0, 0.08), 0 0 0 1px rgba(0, 0, 0, 0.01);
    transition: all 0.35s cubic-bezier(0.2, 0.9, 0.4, 1.1);
    height: 100%;
    backdrop-filter: blur(2px);
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(255,255,255,0.6);
}
.role-card:hover {
    transform: translateY(-12px);
    box-shadow: 0 30px 45px -15px rgba(67, 24, 255, 0.25);
    border-color: rgba(67, 24, 255, 0.3);
}
.card-inner {
    padding: 2.8rem 1.8rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.2rem;
}
.role-icon {
    width: 110px;
    height: 110px;
    background: linear-gradient(145deg, #f0f4ff, #ffffff);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3.8rem;
    color: var(--brand-blue, #4318FF);
    box-shadow: 0 12px 20px -8px rgba(67, 24, 255, 0.2);
    transition: all 0.3s ease;
    margin-bottom: 0.5rem;
}
.role-card:hover .role-icon {
    transform: scale(1.02);
    background: linear-gradient(145deg, #ffffff, #f0f4ff);
    box-shadow: 0 20px 28px -10px rgba(67, 24, 255, 0.35);
    color: #2c0fc7;
}
.role-title {
    font-size: 1.9rem;
    font-weight: 700;
    color: var(--dark-navy, #1B2559);
    margin: 0;
    letter-spacing: -0.3px;
}
.role-description {
    color: var(--text-muted, #5d6f9f);
    font-size: 0.95rem;
    line-height: 1.45;
    padding: 0 0.5rem;
    max-width: 260px;
}
.role-feature-list {
    list-style: none;
    padding: 0;
    margin: 1rem 0 0.5rem;
    text-align: left;
    width: 100%;
}
.role-feature-list li {
    font-size: 0.85rem;
    padding: 0.3rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #2c3e66;
}
.role-feature-list li i {
    color: var(--brand-blue);
    font-size: 1rem;
}

.btn-role {
    background: var(--brand-blue, #4318FF);
    border: none;
    padding: 0.85rem 1.8rem;
    font-weight: 700;
    font-size: 1.05rem;
    border-radius: 60px;
    color: white;
    width: 100%;
    transition: all 0.25s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    box-shadow: 0 6px 14px rgba(67, 24, 255, 0.25);
    margin-top: 1rem;
}
.btn-role:hover {
    background: #3311cc;
    transform: translateY(-3px);
    box-shadow: 0 14px 22px -6px rgba(67, 24, 255, 0.4);
    color: white;
}
.btn-role:active {
    transform: translateY(1px);
}

.role-card[data-role="profesor"] .role-icon {
    background: linear-gradient(145deg, #eaeefc, #ffffff);
    color: #2c5f9a;
}
.role-card[data-role="profesor"]:hover .role-icon {
    color: #1a4d7a;
}
.role-card[data-role="alumno"] .role-icon {
    background: linear-gradient(145deg, #eef1fd, #ffffff);
    color: #5f4bdb;
}
.role-card[data-role="alumno"]:hover .role-icon {
    color: #3f2bb3;
}

.row-cards {
    display: flex;
    gap: 2rem;
    justify-content: center;
    flex-wrap: wrap;
}
.col-role {
    flex: 1;
    min-width: 280px;
    max-width: 400px;
}

.bg-decoration {
    position: fixed;
    bottom: 0;
    right: 0;
    width: 40%;
    height: 40%;
    background: radial-gradient(circle at 100% 100%, rgba(67,24,255,0.03) 0%, rgba(255,255,255,0) 70%);
    pointer-events: none;
    z-index: 0;
}
.bg-decoration-left {
    left: 0;
    top: 0;
    width: 35%;
    height: 35%;
    background: radial-gradient(circle at 0% 0%, rgba(27,37,89,0.02) 0%, transparent 70%);
    position: fixed;
    pointer-events: none;
}

@media (max-width: 768px) {
    body {
        padding: 1rem;
        align-items: flex-start;
    }
    .selection-header h1 {
        font-size: 2rem;
    }
    .selection-header p {
        font-size: 0.95rem;
    }
    .role-icon {
        width: 85px;
        height: 85px;
        font-size: 2.8rem;
    }
    .role-title {
        font-size: 1.5rem;
    }
    .card-inner {
        padding: 1.8rem 1.2rem;
    }
    .row-cards {
        gap: 1.2rem;
    }
}

@media (max-width: 640px) {
    .col-role {
        min-width: 100%;
    }
    .role-card:hover {
        transform: translateY(-6px);
    }
}

::view-transition-old(root) {
    animation: 0.15s ease-out both fade-out;
}
::view-transition-new(root) {
    animation: 0.15s ease-in both fade-in;
}