/* Brand styling */
.brand-link {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    padding: 1rem !important;
    background: linear-gradient(135deg, #343a40 0%, #495057 100%) !important;
    border-bottom: 1px solid #495057 !important;
    transition: all 0.3s ease !important;
    text-decoration: none !important;
    min-height: 80px !important;
}

.brand-link:hover {
    background: linear-gradient(135deg, #495057 0%, #6c757d 100%) !important;
    transform: translateX(2px) !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2) !important;
}



.brand-text {
    font-size: 1rem !important;
    font-weight: 600 !important;
    color: #ffffff !important;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3) !important;
    letter-spacing: 0.5px !important;
    transition: all 0.3s ease !important;
    line-height: 1.2 !important;
    text-align: center !important;
}

.brand-link:hover .brand-text {
    color: #e9ecef !important;
}

/* Game-specific styles */
.game-thumbnail {
    width: 64px;
    height: 64px;
    object-fit: cover;
    border-radius: 8px;
}

.sortable-ghost {
    opacity: 0.4;
}

.sortable-chosen {
    background-color: #f8f9fa;
}

.drag-handle {
    cursor: grab;
    padding: 8px;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.drag-handle:hover {
    background-color: #e9ecef;
}

.drag-handle:active {
    cursor: grabbing;
    background-color: #dee2e6;
}

.loading-skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.preview-container {
    max-width: 200px;
    max-height: 200px;
    overflow: hidden;
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.preview-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* Game Grid Styles */
.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
}

.game-card {
    cursor: pointer;
    overflow: hidden;
    transition: all 0.3s ease;
}

.games-grid .game-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.game-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 15px 15px 0 0;
}

/* Statistics Cards */
.stats-card {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 20px;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    border: none;
}

.stats-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.18);
}

.stats-card-games {
    background: linear-gradient(135deg, #ffffff 0%, #f0f8ff 100%);
}

.stats-card-storage {
    background: linear-gradient(135deg, #ffffff 0%, #f0fff0 100%);
}

/* Modern Statistics Cards */
.modern-stats-card {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 20px;
    cursor: pointer;
    position: relative;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1), 0 4px 16px rgba(0, 0, 0, 0.08);
}

.modern-stats-card:hover {
    transform: translateY(-8px) scale(1.03);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.2), 0 12px 24px rgba(0, 0, 0, 0.15);
}

/* Enhanced shadow effects for AdminLTE integration */
.modern-stats-card.shadow-lg {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15), 0 6px 20px rgba(0, 0, 0, 0.1), 0 2px 8px rgba(0, 0, 0, 0.08) !important;
}

.modern-stats-card.elevation-3 {
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.18), 0 8px 24px rgba(0, 0, 0, 0.12), 0 4px 12px rgba(0, 0, 0, 0.1) !important;
}

.modern-stats-card.shadow-lg:hover {
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.25), 0 15px 30px rgba(0, 0, 0, 0.2), 0 6px 15px rgba(0, 0, 0, 0.15) !important;
}

.games-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
    overflow: hidden;
}

.games-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    transition: left 0.6s;
}

.games-card:hover::before {
    left: 100%;
}

.storage-card {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    position: relative;
    overflow: hidden;
}

.storage-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    transition: left 0.6s;
}

.storage-card:hover::before {
    left: 100%;
}

.stats-decoration {
    position: absolute;
    top: -50px;
    right: -50px;
    width: 100px;
    height: 100px;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.stats-number {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    animation: number-glow 3s ease-in-out infinite;
}

.stats-label {
    font-size: 1rem;
    font-weight: 600;
    opacity: 0.9;
}

.stats-subtitle {
    font-size: 0.8rem;
    opacity: 0.7;
    font-style: italic;
}

.stats-icon-wrapper {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.modern-stats-card:hover .stats-icon-wrapper {
    transform: scale(1.1) rotate(10deg);
    background: rgba(255, 255, 255, 0.25);
}

.stats-icon {
    font-size: 1.8rem;
    color: rgba(255, 255, 255, 0.9);
    transition: all 0.3s ease;
}

.modern-stats-card:hover .stats-icon {
    color: white;
    animation: icon-pulse 0.6s ease-in-out;
}

.stats-info {
    z-index: 2;
    position: relative;
}

/* Keyframe animations */
@keyframes number-glow {
    0%, 100% { 
        text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
        transform: scale(1);
    }
    50% { 
        text-shadow: 0 4px 8px rgba(0, 0, 0, 0.3), 0 0 20px rgba(255, 255, 255, 0.3);
        transform: scale(1.02);
    }
}

@keyframes icon-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

/* Drag and Drop Zone */
.drop-zone {
    border: 2px dashed #dee2e6;
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    background: #f8f9fa;
    transition: all 0.3s ease;
    position: relative;
    cursor: pointer;
}

.drop-zone:hover {
    border-color: #0d6efd;
    background: #e7f3ff;
    transform: translateY(-2px);
}

.drop-zone.dragover {
    border-color: #0d6efd;
    background: #e7f3ff;
    box-shadow: 0 0 20px rgba(13, 110, 253, 0.2);
}

.drop-zone-content {
    pointer-events: none;
}

.drop-zone-icon {
    font-size: 3rem;
    color: #6c757d;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.drop-zone:hover .drop-zone-icon {
    color: #0d6efd;
    transform: scale(1.1);
}

.drop-zone-title {
    color: #495057;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.drop-zone-subtitle {
    color: #6c757d;
    margin-bottom: 0.5rem;
}

.drop-zone-browse {
    color: #0d6efd;
    font-weight: 600;
    text-decoration: underline;
}

.drop-zone-info {
    color: #6c757d;
    font-size: 0.875rem;
}

.drop-zone-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 10;
}

.drop-zone.has-file {
    border-color: #198754;
    background: #d1e7dd;
}

.drop-zone.has-file .drop-zone-icon {
    color: #198754;
}

.drop-zone.error {
    border-color: #dc3545;
    background: #f8d7da;
}

.drop-zone.error .drop-zone-icon {
    color: #dc3545;
}

.stats-card-bg-pattern {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: radial-gradient(circle at 20% 80%, rgba(120, 119, 198, 0.05) 0%, transparent 50%),
                      radial-gradient(circle at 80% 20%, rgba(255, 119, 198, 0.05) 0%, transparent 50%),
                      radial-gradient(circle at 40% 40%, rgba(120, 219, 255, 0.05) 0%, transparent 50%);
    pointer-events: none;
}

.stats-card .card-body {
    padding: 2rem 1.5rem;
    position: relative;
}

.stats-card .card-body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--bs-primary), var(--bs-success));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.stats-card:hover .card-body::before {
    opacity: 1;
}

.stats-card-corner-decoration {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    opacity: 0.1;
    animation: float 3s ease-in-out infinite;
}

.stats-icon-container {
    transition: all 0.4s ease;
    border: 3px solid rgba(255, 255, 255, 0.8);
    position: relative;
    overflow: hidden;
}

.stats-card:hover .stats-icon-container {
    transform: scale(1.15) rotate(8deg);
    box-shadow: 0 0 30px rgba(0, 123, 255, 0.4);
}

.stats-icon-glow {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.3) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.stats-card:hover .stats-icon-glow {
    opacity: 1;
    animation: glow-pulse 2s ease-in-out infinite;
}

.stats-main-icon {
    transition: all 0.3s ease;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.stats-card:hover .stats-main-icon {
    transform: scale(1.1);
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
}

.stats-card h3 {
    font-size: 2.8rem;
    background: linear-gradient(45deg, #007bff, #28a745);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: number-pulse 3s infinite;
    transition: all 0.3s ease;
    font-weight: 800;
    text-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.stats-card:hover h3 {
    transform: scale(1.05);
}

.stats-number {
    font-size: 2.8rem;
    background: linear-gradient(45deg, #007bff, #28a745);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: number-pulse 3s infinite;
    transition: all 0.3s ease;
}

.stats-card:hover .stats-number {
    transform: scale(1.05);
}

.stats-label {
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: color 0.3s ease;
}

.stats-card:hover .stats-label {
    color: #495057 !important;
}

.stats-card .rounded-circle {
    width: 85px;
    height: 85px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.stats-card:hover .rounded-circle {
    transform: scale(1.15) rotate(5deg);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.stats-card .badge {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: badge-bounce 2s infinite;
    transition: all 0.3s ease;
}

.stats-card:hover .badge {
    transform: scale(1.2);
}

.stats-badge {
    animation: badge-bounce 2s infinite;
    transition: all 0.3s ease;
}

.stats-card:hover .stats-badge {
    transform: scale(1.2);
}

.stats-card .progress {
    border-radius: 15px;
    background-color: rgba(0,0,0,0.05);
    overflow: hidden;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

.stats-progress {
    background-color: rgba(0, 0, 0, 0.05);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

.stats-card .progress-bar {
    border-radius: 15px;
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    background: linear-gradient(90deg, currentColor, rgba(255,255,255,0.2));
    position: relative;
    overflow: hidden;
}

.stats-progress-bar {
    border-radius: 15px;
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.stats-progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: progress-shine 2s infinite;
}

.stats-card small {
    font-weight: 500;
    letter-spacing: 0.5px;
}

.stats-status {
    font-weight: 500;
    letter-spacing: 0.3px;
    transition: all 0.3s ease;
}

.stats-card:hover .stats-status {
    transform: translateY(-2px);
}

.stats-trend-icon {
    transition: all 0.3s ease;
    animation: trend-float 2s ease-in-out infinite;
}

.stats-card:hover .stats-trend-icon {
    transform: scale(1.2) rotate(10deg);
}

.stats-card-action {
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

.stats-card:hover .stats-card-action {
    opacity: 1;
    transform: translateY(0);
}

.cursor-pointer {
    cursor: pointer;
}

/* Animations */
@keyframes number-pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.02);
    }
}

@keyframes badge-bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0) scale(1);
    }
    40% {
        transform: translateY(-3px) scale(1.1);
    }
    60% {
        transform: translateY(-1px) scale(1.05);
    }
}

@keyframes glow-pulse {
    0%, 100% {
        opacity: 0.3;
        transform: scale(1);
    }
    50% {
        opacity: 0.6;
        transform: scale(1.1);
    }
}

@keyframes progress-shine {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    50% {
        transform: translateY(-10px) rotate(180deg);
    }
}

@keyframes trend-float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-3px);
    }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.stats-card:hover .fas {
    animation: icon-bounce 0.6s ease;
}

@keyframes icon-bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-8px);
    }
    60% {
        transform: translateY(-4px);
    }
}

/* Enhanced hover animations */
.stats-card .position-absolute.top-0.end-0 i {
    transition: all 0.3s ease;
    opacity: 0.6;
}

.stats-card:hover .position-absolute.top-0.end-0 i {
    opacity: 1;
    transform: scale(1.2);
}

/* Settings Page Styles */
.settings-card {
    border: none;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    margin-bottom: 2rem;
}

.settings-card .card-header {
    background: #007bff;
    color: white;
    border-radius: 15px 15px 0 0;
    border: none;
}

/* Enhanced Button Styles */
.btn {
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.btn-primary {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    border: none;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #0056b3 0%, #004085 100%);
}

.btn-success {
    background: linear-gradient(135deg, #28a745 0%, #1e7e34 100%);
    border: none;
}

.btn-success:hover {
    background: linear-gradient(135deg, #1e7e34 0%, #155724 100%);
}

.btn-danger {
    background: linear-gradient(135deg, #dc3545 0%, #bd2130 100%);
    border: none;
}

.btn-danger:hover {
    background: linear-gradient(135deg, #bd2130 0%, #a71e2a 100%);
}

.btn-warning {
    background: linear-gradient(135deg, #ffc107 0%, #e0a800 100%);
    border: none;
    color: #212529;
}

.btn-warning:hover {
    background: linear-gradient(135deg, #e0a800 0%, #d39e00 100%);
    color: #212529;
}

.btn-info {
    background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
    border: none;
}

.btn-info:hover {
    background: linear-gradient(135deg, #138496 0%, #0f6674 100%);
}

.btn-secondary {
    background: linear-gradient(135deg, #6c757d 0%, #545b62 100%);
    border: none;
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #545b62 0%, #3d4142 100%);
}

/* Custom Button Classes */
.btn-danger-custom,
.btn-success-custom {
    border: none;
    border-radius: 8px;
}

.btn-danger-custom {
    background: linear-gradient(135deg, #dc3545 0%, #bd2130 100%);
}

.btn-danger-custom:hover {
    background: linear-gradient(135deg, #bd2130 0%, #a71e2a 100%);
}

.btn-success-custom {
    background: linear-gradient(135deg, #28a745 0%, #1e7e34 100%);
}

.btn-success-custom:hover {
    background: linear-gradient(135deg, #1e7e34 0%, #155724 100%);
}

/* Responsive Design for Games Grid */
@media (max-width: 576px) {
    .games-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 1rem;
    }
    .game-image {
        height: 150px;
    }
}

@media (max-width: 400px) {
    .games-grid {
        grid-template-columns: 1fr 1fr;
        gap: 0.75rem;
    }
    .game-image {
        height: 120px;
    }
}

/* Icon Styling Enhancements */
.fas, .far, .fab {
    transition: all 0.3s ease;
}

/* Brand icon styling */
.brand-image {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 0;
    margin-bottom: 8px;
    font-size: 1.4rem;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    background: linear-gradient(135deg, #6c757d 0%, #495057 100%) !important;
    color: #ffffff !important;
}

/* Navigation icons */
.nav-icon {
    width: 20px;
    text-align: center;
    margin-right: 8px;
    color: rgba(255,255,255,0.8);
    transition: color 0.3s ease;
}

.nav-link:hover .nav-icon {
    color: #ffffff;
    transform: scale(1.1);
}

/* Button icons */
.btn i {
    margin-right: 6px;
    transition: transform 0.2s ease;
}

.btn:hover i {
    transform: scale(1.05);
}

/* Card header icons */
.card-header i {
    margin-right: 8px;
    opacity: 0.9;
}

/* Statistics card icons */
.stats-card i {
    transition: transform 0.3s ease, color 0.3s ease;
}

.stats-card:hover i {
    transform: scale(1.1) rotate(5deg);
}

/* Toast notification icons */
.toast i {
    font-size: 1.1rem;
    margin-right: 8px;
}

/* Action button icons */
.btn-group .btn i {
    font-size: 0.9rem;
    margin-right: 0;
}

/* Search input icons */
.input-group-text i {
    color: #6c757d;
    font-size: 0.9rem;
}

/* Alert icons */
.alert i {
    margin-right: 8px;
    font-size: 1rem;
}

/* Drag handle icon styling */
.drag-handle {
    color: #6c757d;
    font-size: 1.1rem;
    transition: color 0.2s ease, transform 0.2s ease;
}

.drag-handle:hover {
    color: #495057;
    transform: scale(1.1);
}

/* Empty state icons */
.display-1 {
    font-size: 4rem !important;
    opacity: 0.6;
    margin-bottom: 1rem;
}

/* Modal icons */
.modal-header i {
    margin-right: 8px;
    font-size: 1.1rem;
}

/* Responsive icon adjustments */
@media (max-width: 576px) {
    .brand-image {
        width: 30px;
        height: 30px;
        font-size: 1rem;
    }
    
    .display-1 {
        font-size: 3rem !important;
    }
    
    .stats-card i {
        font-size: 2.5rem;
    }
}

/* Responsive button group layout */
@media (max-width: 767.98px) {
    /* Stack buttons vertically on mobile */
    .col-12.col-md-auto {
        margin-top: 1rem;
    }
    
    .d-flex.flex-column.flex-md-row button {
        width: 100%;
        text-align: center;
    }
}

@media (max-width: 480px) {
    /* Further optimize for very small screens */
    .d-flex.flex-column.flex-md-row button {
        font-size: 0.875rem;
        padding: 0.5rem 1rem;
    }
    
    .d-flex.flex-column.flex-md-row button i {
        margin-right: 0.25rem !important;
    }
}

/* Ensure proper gap spacing */
.gap-2 {
    gap: 0.5rem !important;
}

@media (max-width: 767.98px) {
    .gap-2 {
        gap: 0.75rem !important;
    }
}

/* AdminLTE Customizations */
.content-wrapper {
    background-color: #f4f4f4;
}

/* Interactive Ads Grid Styles */
.hover-shadow-lg {
    transition: all 0.3s ease;
}

.hover-shadow-lg:hover {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15) !important;
    transform: translateY(-5px);
}

.transition-all {
    transition: all 0.3s ease;
}

/* Smooth sidebar transitions */
.main-sidebar {
    transition: margin-left 0.3s ease-in-out;
}

/* Responsive sidebar behavior */
@media (max-width: 767.98px) {
    /* On mobile, sidebar should be hidden by default */
    body:not(.sidebar-open) .main-sidebar {
        margin-left: -250px;
    }
    
    /* When sidebar is open on mobile, show it */
    body.sidebar-open .main-sidebar {
        margin-left: 0;
    }
    
    /* Content should take full width on mobile */
    .content-wrapper {
        margin-left: 0 !important;
    }
}
