/* Profile Page Specific Styles */

.profile-page {
    padding-top: 8rem;
    padding-bottom: 4rem;
    min-height: 100vh;
}

/* Loading State */
.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    gap: 1rem;
}

.loading-state p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--accent-pink);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Login Prompt */
.login-prompt {
    text-align: center;
    padding: 4rem 2rem;
    background: var(--dark-card);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    max-width: 500px;
    margin: 4rem auto;
}

.login-prompt-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
}

.login-prompt h2 {
    font-family: 'Orbitron', sans-serif;
    font-size: 2rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.login-prompt p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

/* Profile Header */
.profile-header {
    background: var(--dark-card);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 3rem;
    margin-bottom: 2rem;
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 2.5rem;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.profile-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, var(--gradient-start), var(--gradient-mid), var(--gradient-end));
}

/* Profile Photo Section */
.profile-photo-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.profile-photo-wrapper {
    position: relative;
    width: 150px;
    height: 150px;
}

.profile-photo,
.profile-photo-placeholder {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    border: 4px solid var(--dark-elevated);
    box-shadow: 0 0 0 2px rgba(255, 27, 107, 0.3);
}

.profile-photo {
    object-fit: cover;
    display: none;
}

.profile-photo.active {
    display: block;
}

.profile-photo-placeholder {
    background: linear-gradient(135deg, var(--accent-pink), var(--accent-purple));
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Orbitron', sans-serif;
    font-size: 3rem;
    font-weight: 700;
    color: white;
}

.profile-photo-placeholder.hide {
    display: none;
}

.btn-upload-photo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    background: var(--dark-elevated);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-upload-photo:hover {
    background: var(--dark-bg);
    border-color: var(--accent-pink);
    transform: translateY(-2px);
}

.btn-upload-photo svg {
    width: 18px;
    height: 18px;
}

/* Profile Info */
.profile-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
}

.profile-name {
    font-family: 'Orbitron', sans-serif;
    font-size: 2.5rem;
    font-weight: 900;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 0;
}

.profile-meta {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    color: var(--text-secondary);
    font-size: 1rem;
}

.profile-uid {
    font-family: 'Courier New', monospace;
    font-weight: 600;
    color: var(--accent-blue);
}

.profile-separator {
    color: var(--text-muted);
}

.profile-team {
    font-weight: 600;
}

.profile-category {
    display: inline-block;
    padding: 0.4rem 1rem;
    background: linear-gradient(135deg, rgba(255, 27, 107, 0.2), rgba(69, 202, 255, 0.2));
    border: 1px solid rgba(255, 27, 107, 0.3);
    border-radius: 20px;
    color: var(--accent-pink);
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    width: fit-content;
    margin-top: 0.5rem;
}

/* Quick Stats */
.profile-quick-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.quick-stat {
    text-align: center;
    padding: 1rem;
    background: var(--dark-elevated);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.quick-stat-value {
    font-family: 'Orbitron', sans-serif;
    font-size: 2rem;
    font-weight: 900;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.quick-stat-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 0.3rem;
    font-weight: 600;
}

/* Profile Sections */
.profile-section {
    margin-bottom: 2rem;
}

.section-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.8rem;
    font-weight: 900;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem;
    background: var(--dark-card);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent-pink);
    box-shadow: 0 10px 30px rgba(255, 27, 107, 0.2);
}

.stat-icon {
    font-size: 2.5rem;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--dark-elevated);
    border-radius: 12px;
}

.stat-content {
    flex: 1;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
    margin-bottom: 0.3rem;
}

.stat-value {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.8rem;
    font-weight: 900;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Awards Grid */
.awards-grid {
    width: 100%;
}

.trophy-cabinet {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 1.5rem;
    justify-content: flex-start;
}

.award-card {
    padding: 2rem 1.5rem;
    background: var(--dark-card);
    border-radius: 16px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    width: 160px;
    flex-shrink: 0;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
}

.award-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.award-card.gold {
    border-color: rgba(255, 215, 0, 0.3);
}

.award-card.gold:hover {
    border-color: gold;
    box-shadow: 0 10px 30px rgba(255, 215, 0, 0.3);
}

.award-card.silver {
    border-color: rgba(192, 192, 192, 0.3);
}

.award-card.silver:hover {
    border-color: silver;
    box-shadow: 0 10px 30px rgba(192, 192, 192, 0.3);
}

.award-card.bronze {
    border-color: rgba(205, 127, 50, 0.3);
}

.award-card.bronze:hover {
    border-color: rgb(205, 127, 50);
    box-shadow: 0 10px 30px rgba(205, 127, 50, 0.3);
}

.award-card.lantern {
    border-color: rgba(255, 100, 100, 0.3);
}

.award-card.lantern:hover {
    border-color: rgb(255, 100, 100);
    box-shadow: 0 10px 30px rgba(255, 100, 100, 0.3);
}

.award-card.punching {
    border-color: rgba(255, 140, 0, 0.3);
}

.award-card.punching:hover {
    border-color: rgb(255, 140, 0);
    box-shadow: 0 10px 30px rgba(255, 140, 0, 0.3);
}

.award-card.giant-killer {
    border-color: rgba(138, 43, 226, 0.3);
}

.award-card.giant-killer:hover {
    border-color: rgb(138, 43, 226);
    box-shadow: 0 10px 30px rgba(138, 43, 226, 0.3);
}

.award-card.bullseye {
    border-color: rgba(0, 191, 255, 0.3);
}

.award-card.bullseye:hover {
    border-color: rgb(0, 191, 255);
    box-shadow: 0 10px 30px rgba(0, 191, 255, 0.3);
}

.award-card.hot-streak {
    border-color: rgba(255, 69, 0, 0.3);
}

.award-card.hot-streak:hover {
    border-color: rgb(255, 69, 0);
    box-shadow: 0 10px 30px rgba(255, 69, 0, 0.3);
}

.award-icon {
    font-size: 3.5rem;
    margin-bottom: 0.5rem;
}

.award-count {
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--accent-pink);
    margin-bottom: 0.75rem;
}

.award-title {
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.award-description {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.awards-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem 2rem;
    background: var(--dark-card);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.awards-empty-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.awards-empty p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* Results List */
.results-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.result-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.result-card {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 1.5rem;
    align-items: center;
    padding: 1.5rem;
    background: var(--dark-card);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
}

.result-card-link:hover .result-card {
    transform: translateX(4px);
    border-color: var(--accent-pink);
}

.result-position {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.5rem;
    font-weight: 900;
    min-width: 50px;
    text-align: center;
}

.result-position.podium {
    background: linear-gradient(135deg, gold, orange);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.result-info {
    flex: 1;
}

.result-event {
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 0.3rem;
}

.result-prediction {
    font-size: 0.8rem;
    color: var(--accent-blue);
    margin-bottom: 0.2rem;
}

.result-date {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.result-stats {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.5rem;
}

.result-time {
    font-family: 'Courier New', monospace;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--accent-blue);
}

.result-points {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.3rem;
    font-weight: 900;
    color: var(--accent-pink);
}

.result-bonuses {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin-top: 0.25rem;
}

.bonus-indicator {
    font-size: 0.75rem;
    padding: 0.2rem 0.5rem;
    background: rgba(255, 140, 0, 0.2);
    border: 1px solid rgba(255, 140, 0, 0.4);
    border-radius: 8px;
    color: rgb(255, 200, 100);
    font-weight: 600;
}

.medal-indicator {
    font-size: 1.2rem;
    padding: 0.2rem 0.4rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    display: inline-block;
    line-height: 1;
}

.medal-indicator.punching {
    background: rgba(255, 140, 0, 0.2);
    border: 1px solid rgba(255, 140, 0, 0.3);
}

.medal-indicator.giant-killer {
    background: rgba(138, 43, 226, 0.2);
    border: 1px solid rgba(138, 43, 226, 0.3);
}

.results-empty {
    text-align: center;
    padding: 4rem 2rem;
    background: var(--dark-card);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.results-empty-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.results-empty p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* Progress Card */
.progress-card {
    padding: 2rem;
    background: var(--dark-card);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.progress-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.progress-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.progress-stage {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.5rem;
    font-weight: 900;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.progress-bar {
    width: 100%;
    height: 12px;
    background: var(--dark-elevated);
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--gradient-start), var(--gradient-mid), var(--gradient-end));
    border-radius: 6px;
    transition: width 0.6s ease;
}

.progress-stats {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.progress-stats span {
    font-weight: 700;
    color: var(--text-primary);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .profile-header {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .profile-quick-stats {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 768px) {
    .profile-page {
        padding-top: 6rem;
    }

    .profile-header {
        padding: 2rem;
    }

    .profile-photo-wrapper,
    .profile-photo,
    .profile-photo-placeholder {
        width: 120px;
        height: 120px;
    }

    .profile-photo-placeholder {
        font-size: 2.5rem;
    }

    .profile-name {
        font-size: 2rem;
    }

    .profile-quick-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .quick-stat-value {
        font-size: 1.5rem;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .result-card {
        grid-template-columns: auto 1fr;
        gap: 1rem;
    }

    .result-time,
    .result-points {
        grid-column: 2;
        text-align: right;
    }
}

@media (max-width: 480px) {
    .profile-header {
        padding: 1.5rem;
    }

    .profile-photo-wrapper,
    .profile-photo,
    .profile-photo-placeholder {
        width: 100px;
        height: 100px;
    }

    .profile-photo-placeholder {
        font-size: 2rem;
    }

    .profile-name {
        font-size: 1.6rem;
    }

    .profile-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.3rem;
    }

    .profile-separator {
        display: none;
    }
}

/* Share Stats Button */
.btn-share-stats {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    background: linear-gradient(135deg, var(--accent-pink), var(--accent-purple));
    border: none;
    border-radius: 8px;
    color: white;
    font-family: 'Exo 2', sans-serif;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 1rem;
}

.btn-share-stats:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(255, 0, 128, 0.4);
}

.btn-share-stats svg {
    width: 18px;
    height: 18px;
}

/* Share Stats Modal */
#shareStatsModal .modal-content.modal-large {
    max-width: 800px;
    width: 95%;
}

.template-selector {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.template-option {
    cursor: pointer;
    text-align: center;
    transition: all 0.3s ease;
    padding: 0.5rem;
    border-radius: 12px;
    border: 2px solid transparent;
}

.template-option:hover {
    border-color: rgba(255, 255, 255, 0.2);
}

.template-option.selected {
    border-color: var(--accent-pink);
}

.template-preview {
    width: 80px;
    height: 142px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.5rem;
    position: relative;
    overflow: hidden;
}

.template-preview-season {
    background: linear-gradient(180deg, #0a0e1a 0%, #1a1a2e 50%, #0a0e1a 100%);
    border: 1px solid rgba(255, 0, 128, 0.3);
}

.template-preview-trophy {
    background: linear-gradient(180deg, #1a1a2e 0%, #2d1f3d 50%, #1a1a2e 100%);
    border: 1px solid rgba(138, 43, 226, 0.3);
}

.template-preview-champion {
    background: linear-gradient(180deg, #0a0e1a 0%, #1a2a1a 50%, #0a0e1a 100%);
    border: 1px solid rgba(255, 215, 0, 0.3);
}

.template-preview-label {
    font-size: 0.5rem;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.template-name {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.template-option.selected .template-name {
    color: var(--accent-pink);
}

.share-preview-container {
    display: flex;
    justify-content: center;
    margin-bottom: 1.5rem;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    padding: 1rem;
    overflow: hidden;
}

#shareCanvas {
    max-width: 100%;
    max-height: 500px;
    width: auto;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.share-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.share-actions .btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

/* Responsive adjustments for share modal */
@media (max-width: 600px) {
    .template-selector {
        gap: 0.5rem;
    }
    
    .template-preview {
        width: 60px;
        height: 107px;
    }
    
    .template-name {
        font-size: 0.75rem;
    }
    
    #shareCanvas {
        max-height: 350px;
    }
}
