* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(45deg, #667eea, #764ba2, #f093fb, #f5576c, #4facfe, #00f2fe);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><defs><radialGradient id="g" cx="50%" cy="50%"><stop offset="0%" style="stop-color:rgba(255,255,255,0.1)"/><stop offset="100%" style="stop-color:rgba(255,255,255,0)"/></radialGradient></defs><circle cx="200" cy="200" r="3" fill="url(%23g)"/><circle cx="800" cy="300" r="2" fill="url(%23g)"/><circle cx="400" cy="600" r="4" fill="url(%23g)"/><circle cx="900" cy="800" r="3" fill="url(%23g)"/><circle cx="100" cy="500" r="2" fill="url(%23g)"/><circle cx="600" cy="100" r="3" fill="url(%23g)"/><circle cx="300" cy="800" r="4" fill="url(%23g)"/><circle cx="700" cy="500" r="2" fill="url(%23g)"/></svg>');
    animation: float 20s ease-in-out infinite;
    pointer-events: none;
    z-index: -1;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0px) rotate(0deg);
    }

    33% {
        transform: translateY(-20px) rotate(120deg);
    }

    66% {
        transform: translateY(-10px) rotate(240deg);
    }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 40px;
    margin-bottom: 30px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    text-align: center;
    position: relative;
    overflow: hidden;
}

header::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: shine 4s infinite;
}

@keyframes shine {
    0% {
        left: -100%;
    }

    100% {
        left: 100%;
    }
}

.profile-img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: linear-gradient(45deg, #667eea, #764ba2, #f093fb, #f5576c);
    background-size: 300% 300%;
    animation: profileGlow 6s ease infinite;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    color: white;
    font-weight: bold;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 1;
    transition: transform 0.3s ease;
}

.profile-img:hover {
    transform: scale(1.1) rotate(5deg);
}

@keyframes profileGlow {

    0%,
    100% {
        background-position: 0% 50%;
        box-shadow: 0 10px 40px rgba(102, 126, 234, 0.4);
    }

    50% {
        background-position: 100% 50%;
        box-shadow: 0 15px 50px rgba(245, 87, 108, 0.4);
    }
}

h1 {
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 2.5em;
    position: relative;
    z-index: 1;
}

.subtitle {
    color: #7f8c8d;
    font-size: 1.2em;
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}

.info-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea, #764ba2, #f093fb, #f5576c);
    background-size: 300% 100%;
    animation: borderFlow 3s ease infinite;
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

@keyframes borderFlow {

    0%,
    100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

.card:hover::before {
    transform: scaleX(1);
}

.card:hover {
    transform: translateY(-15px) scale(1.02);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.2);
}

.card-icon {
    width: 60px;
    height: 60px;
    border-radius: 15px;
    background: linear-gradient(45deg, #667eea, #764ba2);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    font-size: 28px;
    color: white;
    transition: all 0.3s ease;
    animation: iconPulse 2s ease-in-out infinite;
}

@keyframes iconPulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}

.card:hover .card-icon {
    transform: rotate(360deg) scale(1.2);
    background: linear-gradient(45deg, #f093fb, #f5576c);
}

.card h3 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 1.4em;
}

.card p {
    color: #7f8c8d;
    line-height: 1.6;
}

.student-info {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.student-info::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(102, 126, 234, 0.1) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
}

@keyframes rotate {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.student-details {
    position: relative;
    z-index: 1;
}

.detail-item {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    padding: 15px;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.detail-item:hover {
    background: rgba(102, 126, 234, 0.2);
    transform: scale(1.02);
}

.detail-icon {
    margin-right: 15px;
    font-size: 20px;
    width: 30px;
    text-align: center;
}

.detail-text {
    font-weight: 600;
    color: #2c3e50;
    font-size: 1.1em;
}

footer {
    text-align: center;
    margin-top: 40px;
    padding: 30px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

.footer-text {
    color: #7f8c8d;
    font-size: 0.9em;
}

/* Estilos para controles interactivos */
.interactive-controls {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin: 20px 0;
    flex-wrap: wrap;
}

.control-btn {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.control-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.control-btn.active {
    background: linear-gradient(45deg, #f093fb, #f5576c);
}

.visitor-counter {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 15px 0;
    padding: 10px;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 15px;
    font-size: 14px;
}

.mini-btn {
    background: linear-gradient(45deg, #f093fb, #f5576c);
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 12px;
    font-weight: bold;
    transition: all 0.3s ease;
}

.mini-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 5px 15px rgba(245, 87, 108, 0.4);
}

/* Estilos para modales */
.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background: white;
    margin: 10% auto;
    padding: 30px;
    border-radius: 20px;
    width: 80%;
    max-width: 500px;
    position: relative;
    animation: modalSlideIn 0.3s ease-out;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.close {
    position: absolute;
    right: 15px;
    top: 15px;
    font-size: 24px;
    cursor: pointer;
    color: #999;
    transition: color 0.3s;
}

.close:hover {
    color: #333;
}

.card-stats {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.stat {
    font-size: 14px;
    color: #666;
}

.card.interactive {
    cursor: pointer;
}

.card.interactive:hover {
    transform: translateY(-15px) scale(1.02);
    cursor: pointer;
}

.detail-item.interactive {
    position: relative;
}

.edit-icon {
    opacity: 0;
    transition: opacity 0.3s ease;
    margin-left: auto;
    cursor: pointer;
}

.detail-item.interactive:hover .edit-icon {
    opacity: 1;
}

/* Mini juego */
.mini-game {
    background: linear-gradient(45deg, rgba(102, 126, 234, 0.1), rgba(245, 87, 108, 0.1));
    padding: 20px;
    border-radius: 15px;
    margin-top: 20px;
    text-align: center;
}

.game-controls {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin: 15px 0;
}

.game-controls input {
    padding: 10px;
    border: 2px solid #ddd;
    border-radius: 10px;
    font-size: 16px;
    text-align: center;
    width: 100px;
}

.game-controls button {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
}

.game-controls button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

#gameResult {
    margin-top: 15px;
    font-weight: bold;
    font-size: 16px;
    min-height: 24px;
}

/* Tema oscuro */
body.dark-theme {
    background: linear-gradient(45deg, #1a1a2e, #16213e, #0f3460);
    color: #e0e0e0;
}

body.dark-theme .card,
body.dark-theme header,
body.dark-theme .student-info,
body.dark-theme footer {
    background: rgba(0, 0, 0, 0.7);
    color: #e0e0e0;
}

/* Footer interactivo */
.footer-interactive {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

.contact-form,
.quick-stats {
    background: rgba(102, 126, 234, 0.1);
    padding: 20px;
    border-radius: 15px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 15px;
}

.form-group input,
.form-group textarea {
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 10px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
}

.form-group button {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 12px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
}

.form-group button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-top: 15px;
}

.stat-item {
    text-align: center;
    padding: 15px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 10px;
    transition: transform 0.3s ease;
}

.stat-item:hover {
    transform: scale(1.05);
}

.stat-number {
    display: block;
    font-size: 24px;
    font-weight: bold;
    color: #667eea;
}

.stat-label {
    font-size: 12px;
    color: #666;
}

#messagesList {
    max-height: 150px;
    overflow-y: auto;
    margin-top: 15px;
}

.message-item {
    background: rgba(255, 255, 255, 0.7);
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 8px;
    font-size: 14px;
    animation: messageSlideIn 0.3s ease-out;
}

@keyframes messageSlideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.message-author {
    font-weight: bold;
    color: #667eea;
}

.tech-stack {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}

.tech-badge {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 0.9em;
    font-weight: 500;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    animation: badgeFloat 3s ease-in-out infinite;
}

.tech-badge:nth-child(odd) {
    animation-delay: -1.5s;
}

@keyframes badgeFloat {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-5px);
    }
}

.tech-badge::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.tech-badge:hover::before {
    left: 100%;
}

.tech-badge:hover {
    transform: scale(1.15) translateY(-3px);
    background: linear-gradient(45deg, #f093fb, #f5576c);
    box-shadow: 0 10px 25px rgba(245, 87, 108, 0.4);
}

/* Animaciones adicionales */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }

    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

@keyframes confettiFall {
    to {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}

@keyframes particleFloat {

    0%,
    100% {
        transform: translateY(0px) translateX(0px) rotate(0deg);
        opacity: 0.3;
    }

    33% {
        transform: translateY(-20px) translateX(10px) rotate(120deg);
        opacity: 0.8;
    }

    66% {
        transform: translateY(-10px) translateX(-10px) rotate(240deg);
        opacity: 0.5;
    }
}

@keyframes blink {

    0%,
    50% {
        border-color: transparent;
    }

    51%,
    100% {
        border-color: currentColor;
    }
}

@keyframes cardWave {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
    }
}

@keyframes rippleEffect {
    0% {
        transform: scale(0);
        opacity: 1;
    }

    100% {
        transform: scale(4);
        opacity: 0;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 10px;
    }

    header {
        padding: 30px 20px;
    }

    h1 {
        font-size: 2em;
    }

    .info-cards {
        grid-template-columns: 1fr;
    }

    .footer-interactive {
        grid-template-columns: 1fr;
    }

    .interactive-controls {
        flex-direction: column;
        align-items: center;
    }

    .tech-stack {
        justify-content: center;
    }
}