/**
 * Modern Design Enhancements
 * Inspired by Instagram, Facebook, and League of Legends
 */

/* Instagram-style: Clean, minimal, smooth animations */
:root {
    /* Instagram-inspired colors */
    --ig-gradient: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    --ig-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --ig-shadow-hover: 0 8px 24px rgba(0, 0, 0, 0.15);
    
    /* Facebook-inspired colors */
    --fb-blue: #1877f2;
    --fb-blue-dark: #166fe5;
    --fb-gray: #f0f2f5;
    --fb-text: #050505;
    --fb-text-secondary: #65676b;
    
    /* League of Legends inspired */
    --lol-dark: #0a0e27;
    --lol-dark-secondary: #1a1f3a;
    --lol-gold: #c89b3c;
    --lol-gold-light: #f0e6d2;
    --lol-accent: #0ac8b9;
    --lol-accent-dark: #0397ab;
    
    /* Smooth transitions */
    --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Instagram-style: Smooth card animations */
.game-card,
.ucp-card,
.stat-card {
    transition: all var(--transition-normal);
    will-change: transform, box-shadow;
}

.game-card:hover,
.ucp-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--ig-shadow-hover);
}

/* Instagram-style: Rounded corners and clean design */
.game-card,
.ucp-card,
.auth-card {
    border-radius: 16px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    backdrop-filter: blur(10px);
}

/* Facebook-style: Clean feed-like interface */
.ucp-content {
    background: var(--fb-gray);
    min-height: calc(100vh - 80px);
}

.ucp-card {
    background: white;
    border: none;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    margin-bottom: 16px;
}

/* League of Legends: Dark theme option */
body.dark-theme {
    background: var(--lol-dark);
    color: var(--lol-gold-light);
}

body.dark-theme .ucp-sidebar {
    background: linear-gradient(180deg, var(--lol-dark-secondary) 0%, var(--lol-dark) 100%);
    border-right: 1px solid rgba(200, 155, 60, 0.1);
}

body.dark-theme .ucp-card,
body.dark-theme .game-card {
    background: var(--lol-dark-secondary);
    border: 1px solid rgba(200, 155, 60, 0.1);
    color: var(--lol-gold-light);
}

body.dark-theme .ucp-header {
    background: var(--lol-dark-secondary);
    border-bottom: 1px solid rgba(200, 155, 60, 0.1);
}

/* Instagram-style: Smooth button animations */
.btn {
    position: relative;
    overflow: hidden;
    transition: all var(--transition-fast);
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: var(--ig-gradient);
    border: none;
    box-shadow: var(--ig-shadow);
}

.btn-primary:hover {
    box-shadow: var(--ig-shadow-hover);
    transform: translateY(-2px);
}

/* Facebook-style: Clean navigation */
.nav-item {
    border-radius: 8px;
    margin: 4px 8px;
    transition: all var(--transition-fast);
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(4px);
}

.nav-item.active {
    background: rgba(255, 255, 255, 0.2);
    font-weight: 600;
}

/* League of Legends: Ranked badges styling */
.ranked-badge {
    background: linear-gradient(135deg, var(--lol-gold) 0%, #d4af37 100%);
    color: var(--lol-dark);
    padding: 6px 12px;
    border-radius: 12px;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(200, 155, 60, 0.3);
}

/* Instagram-style: Image/game icon hover effects */
.game-icon,
.game-icon-large {
    transition: all var(--transition-normal);
}

.game-card:hover .game-icon {
    transform: scale(1.1) rotate(5deg);
}

/* Facebook-style: Clean typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

/* Instagram-style: Smooth page transitions */
.ucp-content {
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* League of Legends: Gaming aesthetic for game cards */
.game-card.featured {
    background: linear-gradient(135deg, rgba(200, 155, 60, 0.1) 0%, rgba(10, 200, 185, 0.1) 100%);
    border: 2px solid var(--lol-gold);
    position: relative;
    overflow: hidden;
}

.game-card.featured::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(200, 155, 60, 0.1), transparent);
    transform: rotate(45deg);
    animation: shine 3s infinite;
}

@keyframes shine {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

/* Instagram-style: Clean form inputs */
.form-control,
.form-group input,
.form-group select {
    border-radius: 12px;
    border: 2px solid #e0e0e0;
    transition: all var(--transition-fast);
    background: white;
}

.form-control:focus,
.form-group input:focus,
.form-group select:focus {
    border-color: var(--fb-blue);
    box-shadow: 0 0 0 4px rgba(24, 119, 242, 0.1);
    outline: none;
}

/* Facebook-style: Clean tables */
.table {
    border-radius: 12px;
    overflow: hidden;
}

.table thead {
    background: var(--fb-gray);
}

.table tbody tr {
    transition: background var(--transition-fast);
}

.table tbody tr:hover {
    background: var(--fb-gray);
}

/* League of Legends: Stats with gaming aesthetic */
.stat-card {
    background: linear-gradient(135deg, rgba(10, 200, 185, 0.05) 0%, rgba(200, 155, 60, 0.05) 100%);
    border: 1px solid rgba(200, 155, 60, 0.2);
}

.stat-icon {
    background: var(--ig-gradient);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Instagram-style: Smooth loading states */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Facebook-style: Notification badges */
.notification-badge {
    background: var(--fb-blue);
    color: white;
    border-radius: 10px;
    padding: 2px 6px;
    font-size: 11px;
    font-weight: 600;
    min-width: 18px;
    text-align: center;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* League of Legends: Game result animations */
.game-results {
    animation: slideUp 0.5s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.result-icon {
    animation: bounceIn 0.6s ease-out;
}

@keyframes bounceIn {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Instagram-style: Responsive grid improvements */
.games-grid {
    gap: 24px;
}

@media (max-width: 768px) {
    .games-grid {
        gap: 16px;
    }
    
    .game-card:hover {
        transform: translateY(-4px) scale(1.01);
    }
}

/* Facebook-style: Clean sidebar improvements */
.sidebar-user {
    padding: 20px;
    border-radius: 12px;
    margin: 12px;
    background: rgba(255, 255, 255, 0.1);
    transition: all var(--transition-fast);
}

.sidebar-user:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* League of Legends: Enhanced game play area */
.game-area {
    background: linear-gradient(135deg, var(--lol-dark-secondary) 0%, var(--lol-dark) 100%);
    border: 2px solid rgba(200, 155, 60, 0.2);
    border-radius: 16px;
    position: relative;
    overflow: hidden;
}

.game-area::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 50% 50%, rgba(10, 200, 185, 0.1) 0%, transparent 70%);
    pointer-events: none;
}

/* Instagram-style: Smooth scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: var(--ig-gradient);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(45deg, #bc1888 0%, #dc2743 100%);
}

/* Facebook-style: Clean alerts */
.alert {
    border-radius: 12px;
    border-left: 4px solid;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* League of Legends: Enhanced buttons for gaming */
.btn-large {
    padding: 16px 32px;
    font-size: 18px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    background: linear-gradient(135deg, var(--lol-gold) 0%, #d4af37 100%);
    color: var(--lol-dark);
    box-shadow: 0 4px 16px rgba(200, 155, 60, 0.4);
    transition: all var(--transition-normal);
}

.btn-large:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(200, 155, 60, 0.6);
}

/* Instagram-style: Clean modal/overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn var(--transition-normal);
}

.modal-content {
    background: white;
    border-radius: 20px;
    padding: 32px;
    max-width: 500px;
    width: 90%;
    animation: slideUp 0.3s ease-out;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

/* Responsive improvements */
@media (max-width: 768px) {
    /* Mobile sidebar styles - overridden by mobile.css */
    .ucp-sidebar {
        /* Mobile styles handled in mobile.css */
    }
    
    .modal-content {
        padding: 24px;
        border-radius: 16px;
    }
}

/* League of Legends: Ranked progress bars */
.progress-bar {
    height: 8px;
    background: var(--lol-dark-secondary);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--lol-gold) 0%, var(--lol-accent) 100%);
    border-radius: 4px;
    transition: width var(--transition-slow);
    position: relative;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}


/* Featured Navigation Badge */
.featured-nav-item {
    position: relative;
    font-weight: 700;
}

.featured-badge {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: linear-gradient(135deg, #ffd700 0%, #ccac00 100%);
    color: #333;
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.3);
}
