/* ====================================== */
/* PERFIL.CSS - Profile Page Styles      */
/* ====================================== */

/* Main Content */
.main-content {
    min-height: 100vh;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 50%, #e9ecef 100%);
}

/* Profile Wrapper */
.profile-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 70vh;
    padding: var(--spacing-xl);
}

/* Yu-Gi-Oh Card */
.yugioh-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 50%, #e9ecef 100%);
    border: 3px solid #007bff;
    border-radius: 15px;
    box-shadow:
        0 0 30px rgba(0, 123, 255, 0.5),
        0 0 60px rgba(138, 43, 226, 0.3),
        inset 0 0 30px rgba(0, 123, 255, 0.1);
    max-width: 400px;
    width: 100%;
    position: relative;
    overflow: hidden;
    animation: cardGlow 3s ease-in-out infinite alternate;
}

.yugioh-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(from 0deg, transparent, rgba(0, 123, 255, 0.3), transparent);
    animation: rotate 4s linear infinite;
    pointer-events: none;
}

/* Card Title Section */
.card-title-section {
    background: linear-gradient(90deg, #ff6b6b, #ffa500, #ffff00);
    padding: var(--spacing-md);
    text-align: center;
    border-bottom: 2px solid #007bff;
    position: relative;
}

.card-title {
    color: #000;
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.card-category {
    color: #000;
    font-size: 0.9rem;
    font-weight: 600;
    margin-top: 0.25rem;
}

/* Profile Image Section */
.profile-image-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-lg);
    background: linear-gradient(180deg, rgba(0, 123, 255, 0.1) 0%, rgba(138, 43, 226, 0.1) 100%);
    position: relative;
    min-height: 200px;
    width: 100%;
}

.profile-image {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    border-radius: 15px;
    border: 4px solid #007bff;
    box-shadow:
        0 0 20px rgba(0, 123, 255, 0.8),
        0 0 40px rgba(138, 43, 226, 0.4);
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

.change-photo-btn {
    background: #ffffff;
    color: #000000;
    border: 2px solid #007bff;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    position: absolute;
    bottom: var(--spacing-md);
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    opacity: 0;
    transform: translateX(-50%) translateY(10px);
}

.profile-image-section:hover .change-photo-btn {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.change-photo-btn:hover {
    transform: translateX(-50%) translateY(-2px) scale(1.05);
    box-shadow:
        0 6px 20px rgba(0, 123, 255, 0.3),
        0 0 30px rgba(138, 43, 226, 0.2);
}

/* Player Info Section */
.player-info-section {
    padding: var(--spacing-lg);
    text-align: center;
}

.player-display-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: #00ffff;
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.8);
    margin-bottom: var(--spacing-sm);
}

.player-level-display {
    font-size: 1.1rem;
    color: #ffa500;
    font-weight: 600;
    margin-bottom: var(--spacing-lg);
}

.level-number {
    font-weight: 800;
    color: #ffff00;
}

/* Player Stats */
.player-stats {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
}

.stat-item {
    background: rgba(255, 255, 255, 0.05);
    padding: var(--spacing-sm);
    border-radius: 8px;
    border: 1px solid rgba(0, 255, 255, 0.3);
}

.stat-label-text {
    font-size: 0.8rem;
    color: #b0b0b0;
    margin-bottom: 0.25rem;
}

.stat-value-number {
    font-size: 1.2rem;
    font-weight: 700;
    color: #00ffff;
}

/* Progress Container */
.progress-container {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    margin-bottom: var(--spacing-md);
    overflow: hidden;
}

.progress-fill-bar {
    height: 100%;
    background: linear-gradient(90deg, #00ffff, #8a2be2);
    border-radius: 4px;
    width: 0%;
    transition: width 0.5s ease;
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
}

/* Player Description */
.player-description {
    margin-bottom: var(--spacing-lg);
}

.description-text {
    color: #e0e0e0;
    font-size: 0.9rem;
    line-height: 1.4;
}

/* Card Actions Section */
.card-actions-section {
    background: linear-gradient(90deg, #8a2be2, #ff6b6b);
    padding: var(--spacing-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 2px solid #007bff;
    position: relative;
}

.change-name-btn {
    background: #ffffff;
    color: #000000;
    border: 2px solid #007bff;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    opacity: 0;
    transform: translateY(10px);
}

.card-actions-section:hover .change-name-btn {
    opacity: 1;
    transform: translateY(0);
}

.change-name-btn:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow:
        0 6px 20px rgba(0, 123, 255, 0.3),
        0 0 30px rgba(138, 43, 226, 0.2);
}

.rarity-stars {
    font-size: 1.2rem;
    color: #ffff00;
    text-shadow: 0 0 10px #ffff00;
    font-weight: 700;
}

/* Animations */
@keyframes cardGlow {
    from {
        box-shadow:
            0 0 30px rgba(0, 255, 255, 0.5),
            0 0 60px rgba(138, 43, 226, 0.3),
            inset 0 0 30px rgba(0, 255, 255, 0.1);
    }
    to {
        box-shadow:
            0 0 40px rgba(255, 0, 255, 0.5),
            0 0 80px rgba(255, 165, 0, 0.3),
            inset 0 0 40px rgba(255, 0, 255, 0.1);
    }
}

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

/* Achievements Section */
.achievements-section {
    background: linear-gradient(135deg, #0f0f2e 0%, #1a1a4d 50%, #0f0f2e 100%);
    padding: 80px 0;
    margin-top: 60px;
    position: relative;
    overflow: hidden;
}

.achievements-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(255, 215, 0, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(138, 43, 226, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.achievements-section h2 {
    text-align: center;
    margin-bottom: 60px;
    font-size: 3rem;
    font-weight: 900;
    background: linear-gradient(135deg, #FFD700, #FFA500, #FF6B6B, #FF00FF);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 30px rgba(255, 215, 0, 0.4);
    animation: gradientShift 3s ease infinite;
    position: relative;
    z-index: 1;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.achievements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 40px;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 1;
}

.achievement-actions {
    text-align: center;
    margin-top: 40px;
    position: relative;
    z-index: 1;
}

.achievement-item {
    /* Card Style - RPG/Anime */
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 250, 252, 0.9) 100%);
    border: 3px solid #9333ea;
    border-radius: 20px;
    padding: 0;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    opacity: 0.5;
    filter: grayscale(100%) brightness(0.7);
    transform: perspective(1000px) rotateX(5deg) rotateY(-5deg);
    position: relative;
    overflow: hidden;
    box-shadow: 
        0 10px 30px rgba(0, 0, 0, 0.3),
        inset 0 0 30px rgba(147, 51, 234, 0.1);
    min-height: 320px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Card Header - Rarity indicator */
.achievement-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 8px;
    background: linear-gradient(90deg, #9333ea, #d946ef, #f059e8);
    z-index: 2;
}

/* Shimmer effect */
.achievement-item::after {
    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.6s;
    z-index: 1;
}

.achievement-item:hover::after {
    left: 100%;
}

/* Locked state */
.achievement-item.locked {
    background: linear-gradient(135deg, rgba(200, 210, 220, 0.9) 0%, rgba(230, 240, 245, 0.9) 100%);
    border-color: #cbd5e1;
}

.achievement-item.locked .icon {
    opacity: 0.4;
    filter: grayscale(100%);
}

.achievement-item.locked h4,
.achievement-item.locked p {
    color: #94a3b8;
}

/* Unlocked state - Premium Card Effect */
.achievement-item.unlocked {
    opacity: 1;
    filter: grayscale(0%) brightness(1);
    background: linear-gradient(135deg, #fff9e6 0%, #ffe6cc 25%, #ffccff 50%, #e6ccff 75%, #fff9e6 100%);
    background-size: 300% 300%;
    border: 3px solid;
    border-image: linear-gradient(135deg, #FFD700, #FFA500, #FF6B6B, #FF00FF) 1;
    box-shadow: 
        0 0 20px rgba(255, 215, 0, 0.6),
        0 0 40px rgba(255, 215, 0, 0.4),
        0 0 60px rgba(255, 101, 107, 0.3),
        0 20px 50px rgba(138, 43, 226, 0.3),
        inset 0 0 30px rgba(255, 215, 0, 0.2);
    animation: cardPulse 2s ease-in-out infinite;
    transform: perspective(1000px) rotateX(0deg) rotateY(0deg) scale(1);
}

@keyframes cardPulse {
    0%, 100% { 
        box-shadow: 
            0 0 20px rgba(255, 215, 0, 0.6),
            0 0 40px rgba(255, 215, 0, 0.4),
            0 0 60px rgba(255, 101, 107, 0.3),
            0 20px 50px rgba(138, 43, 226, 0.3),
            inset 0 0 30px rgba(255, 215, 0, 0.2);
    }
    50% { 
        box-shadow: 
            0 0 30px rgba(255, 215, 0, 0.8),
            0 0 60px rgba(255, 215, 0, 0.6),
            0 0 80px rgba(255, 101, 107, 0.4),
            0 25px 60px rgba(138, 43, 226, 0.4),
            inset 0 0 40px rgba(255, 215, 0, 0.3);
    }
}

.achievement-item.unlocked:hover {
    transform: perspective(1000px) rotateX(-10deg) rotateY(10deg) scale(1.15);
    box-shadow: 
        0 0 40px rgba(255, 215, 0, 0.8),
        0 0 60px rgba(255, 215, 0, 0.6),
        0 0 100px rgba(255, 101, 107, 0.5),
        0 30px 80px rgba(138, 43, 226, 0.5),
        inset 0 0 40px rgba(255, 215, 255, 0.3);
}

.achievement-item:hover:not(.unlocked) {
    transform: perspective(1000px) rotateX(-5deg) rotateY(5deg) scale(1.05);
    border-color: #d946ef;
    box-shadow: 0 15px 40px rgba(217, 70, 239, 0.3);
}

/* Card Content */
.achievement-content {
    padding: 25px 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex-grow: 1;
    position: relative;
    z-index: 2;
}

.achievement-item .icon {
    font-size: 4.5rem;
    margin: 10px 0;
    display: block;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
    animation: iconFloat 3s ease-in-out infinite;
}

.achievement-item.unlocked .icon {
    filter: drop-shadow(0 2px 4px rgba(255, 215, 0, 0.8));
    animation: iconGlow 1.5s ease-in-out infinite;
}

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

@keyframes iconGlow {
    0%, 100% { 
        filter: drop-shadow(0 0 8px rgba(255, 215, 0, 0.6));
        transform: scale(1);
    }
    50% { 
        filter: drop-shadow(0 0 12px rgba(255, 215, 0, 0.9));
        transform: scale(1.1);
    }
}

.achievement-item h4 {
    margin: 0 0 8px;
    font-size: 1.2rem;
    font-weight: 700;
    color: #0f172a;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.achievement-item.unlocked h4 {
    color: #8a2be2;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.4);
}

.achievement-item p {
    font-size: 0.9rem;
    color: #64748b;
    line-height: 1.5;
    margin: 0;
}

.achievement-item.unlocked p {
    color: #5a3d9b;
    font-weight: 500;
}

/* Rarity badge */
.achievement-rarity {
    position: absolute;
    bottom: 15px;
    right: 15px;
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 800;
    opacity: 0;
    z-index: 3;
    transition: opacity 0.3s;
}

.achievement-item.unlocked .achievement-rarity {
    opacity: 1;
}

/* Responsive */
@media (max-width: 768px) {
    .achievements-section h2 {
        font-size: 2rem;
    }

    .achievements-grid {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
        gap: 20px;
    }

    .achievement-item {
        min-height: 280px;
    }

    .achievement-content {
        padding: 20px 15px;
    }

    .achievement-item .icon {
        font-size: 3.5rem;
    }
}

@media (max-width: 480px) {
    .achievements-section {
        padding: 60px 0;
    }

    .achievements-section h2 {
        font-size: 1.5rem;
        margin-bottom: 40px;
    }

    .achievements-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 15px;
        padding: 0 10px;
    }

    .achievement-item {
        min-height: 240px;
    }

    .achievement-content {
        padding: 15px 10px;
    }

    .achievement-item .icon {
        font-size: 3rem;
        margin: 8px 0;
    }

    .achievement-item h4 {
        font-size: 1rem;
    }

    .achievement-item p {
        font-size: 0.8rem;
    }

    .yugioh-card {
        max-width: 350px;
    }

    .player-stats {
        grid-template-columns: 1fr;
        gap: var(--spacing-sm);
    }

    .card-actions-section {
        flex-direction: column;
        gap: var(--spacing-sm);
    }
}
    }

    .achievements-grid {
        grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
        gap: 15px;
    }

    .achievement-item {
        padding: 20px;
    }

    .achievement-item .icon {
        font-size: 2.5rem;
    }

    .achievement-item h4 {
        font-size: 0.95rem;
    }
}