:root {
    --space-dark: #0d0b18;
    --cosmic-purple: #321555;
    --sunset-magenta: #cc2b7a;
    --sunset-orange: #f07167;
    --sunset-gold: #fed9b7;
    --cyan-glow: #4cc9f0;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Montserrat', sans-serif;
}

body {
    background-color: var(--space-dark);
    color: var(--sunset-gold);
    line-height: 1.6;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.container {
    max-width: 850px;
    width: 100%;
    background: linear-gradient(180deg, 
                rgba(50, 21, 85, 0.65) 0%, 
                rgba(204, 43, 122, 0.25) 60%, 
                rgba(13, 11, 24, 0.95) 100%);
    padding: 40px;
    border-radius: 24px;
    border: 1px solid rgba(240, 113, 103, 0.25);
    box-shadow: 0 15px 50px rgba(50, 21, 85, 0.5), 0 0 30px rgba(204, 43, 122, 0.1);
    margin-top: 50px;
    position: relative; 
}

h1 {
    color: var(--sunset-gold);
    margin-bottom: 25px;
    text-align: center;
    font-family: 'Cinzel', serif; 
    font-size: 2.8rem;
    text-shadow: 0 0 15px rgba(240, 113, 103, 0.5), 0 0 30px rgba(204, 43, 122, 0.3);
}

.academic-text {
    text-align: center;
    font-weight: 700;
    color: var(--sunset-orange);
    margin-bottom: 10px;
    text-shadow: 0 0 8px rgba(240, 113, 103, 0.3);
}

.content-flex {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 40px;
    margin: 35px 0;
    flex-wrap: wrap;
}

.yugioh-card {
    width: 300px;
    background: linear-gradient(135deg, #2b1042 0%, #150721 100%);
    border: 6px solid #b87333; 
    border-radius: 12px;
    padding: 12px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.8);
    display: flex;
    flex-direction: column;
    gap: 6px;
    position: relative;
    opacity: 0;
    transform: scale(0.2) rotateY(270deg) translateY(-100px);
    filter: brightness(3) blur(5px); 
    transition: transform 1.6s cubic-bezier(0.16, 1, 0.3, 1), 
                opacity 1.2s cubic-bezier(0.16, 1, 0.3, 1),
                filter 1.4s ease-out,
                box-shadow 2s ease-in-out;
}

.yugioh-card.summoned {
    opacity: 1;
    transform: scale(1) rotateY(0deg) translateY(0);
    filter: brightness(1) blur(0px);
    box-shadow: 0 0 35px rgba(76, 201, 240, 0.6), 
                0 0 60px rgba(204, 43, 122, 0.3),
                0 20px 40px rgba(0,0,0,0.7);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #b87333;
    padding-bottom: 2px;
}

.card-name {
    font-family: 'Cinzel', serif;
    font-weight: bold;
    font-size: 1.1rem;
    color: var(--sunset-gold);
    text-shadow: 1px 1px 2px #000;
}

.card-attribute {
    color: #ff477e;
    font-weight: bold;
    font-size: 1.2rem;
}

.card-level {
    text-align: right;
    font-size: 0.75rem;
    letter-spacing: 2px;
}

.card-art-box {
    width: 100%;
    height: 260px;
    border: 3px solid #8b5a2b;
    background-color: #000;
    overflow: hidden;
    border-radius: 4px;
}

.profile-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-info-box {
    background: linear-gradient(180deg, #fceddb 0%, #d8b28a 100%);
    color: #1a1a2e;
    padding: 10px;
    border-radius: 4px;
    border: 2px solid #8b5a2b;
}

.monster-type {
    font-weight: bold;
    font-size: 0.8rem;
    margin-bottom: 4px;
}

.card-description {
    font-size: 0.75rem;
    line-height: 1.3;
    color: #2c2c35;
    margin-bottom: 6px !important;
}

.card-divider {
    border: 0;
    height: 1px;
    background: #8b5a2b;
    margin: 4px 0;
}

.card-stats {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    font-weight: bold;
    font-size: 0.8rem;
    font-family: 'Cinzel', serif;
}

.links-container {
    flex: 1;
    min-width: 280px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.profile-bio {
    font-size: 0.95rem;
    color: rgba(254, 217, 183, 0.9);
    line-height: 1.6;
    text-align: justify;
}

.social-links-grid {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.social-link {
    color: var(--cyan-glow);
    text-decoration: none;
    font-weight: bold;
    font-size: 1rem;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.social-link:hover {
    color: var(--sunset-orange);
    transform: translateX(3px);
    text-shadow: 0 0 8px rgba(240, 113, 103, 0.6);
}

.dedicatory-text {
    font-size: 0.9rem;
    color: rgba(254, 217, 183, 0.7);
    line-height: 1.5;
    border-left: 3px solid var(--sunset-magenta);
    padding-left: 12px;
}

.teachers-section, .classmates-section {
    margin-top: 40px;
    width: 100%;
    border-top: 1px solid rgba(240, 113, 103, 0.15);
    padding-top: 25px;
}

.teachers-section h2, .classmates-section h2 {
    font-family: 'Cinzel', serif;
    font-size: 1.4rem;
    color: var(--sunset-orange);
    margin-bottom: 15px;
}

.teachers-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.teacher-link {
    color: var(--sunset-gold);
    text-decoration: none;
    font-size: 0.95rem;
    padding: 8px 12px;
    background: rgba(50, 21, 85, 0.3);
    border-radius: 8px;
    border: 1px solid rgba(76, 201, 240, 0.1);
    transition: all 0.3s ease;
}

.teacher-link:hover {
    background: rgba(204, 43, 122, 0.2);
    border-color: var(--sunset-magenta);
    color: #fff;
    padding-left: 18px;
}

.classmates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 12px;
}

.classmate-link {
    color: var(--sunset-gold);
    text-decoration: none;
    font-size: 0.9rem;
    padding: 10px;
    background: rgba(13, 11, 24, 0.4);
    border-radius: 8px;
    border: 1px solid rgba(240, 113, 103, 0.15);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
}

.classmate-link:not(.disabled):hover {
    background: rgba(50, 21, 85, 0.5);
    border-color: var(--cyan-glow);
    color: var(--cyan-glow);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(76, 201, 240, 0.15);
}

.classmate-link.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    border-style: dashed;
}

.btn-interactive {
    display: inline-block;
    padding: 12px 35px;
    margin-top: 20px;
    color: var(--space-dark);
    text-transform: uppercase;
    font-weight: bold;
    letter-spacing: 1.5px;
    font-family: 'Cinzel', serif;
    border-radius: 30px;
    background: linear-gradient(45deg, var(--sunset-orange) 0%, var(--sunset-magenta) 100%);
    border: none;
    cursor: pointer;
    font-size: 0.95rem;
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 5px 15px rgba(204, 43, 122, 0.4);
}

.btn-interactive:hover {
    box-shadow: 0 10px 25px rgba(240, 113, 103, 0.6), 0 0 30px rgba(76, 201, 240, 0.3);
    transform: translateY(-3px);
    color: #fff;
}

.simulation-box {
    text-align: center;
    margin-top: 35px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    width: 100%;
}

#canvas-ondas {
    width: 100%;
    height: 180px;
    background: rgba(13, 11, 24, 0.6);
    border-radius: 12px;
    border: 1px solid rgba(76, 201, 240, 0.2);
    box-shadow: inset 0 0 15px rgba(0, 0, 0, 0.6);
    display: none;
    opacity: 0;
    transform: scaleY(0);
    transform-origin: top;
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

#canvas-ondas.active {
    display: block;
    opacity: 1;
    transform: scaleY(1);
}
