* {
    box-sizing: border-box;
}

body, html {
    margin: 0;
    padding: 0;
    font-family: sans-serif;
    background: #1a1a1a;
    color: #fff;
    height: 100%;
    width: 100%;
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
    -webkit-font-smoothing: antialiased;
}

.container {
    display: flex;
    flex-direction: row;
    min-height: 100vh;
    width: 100%;
    padding-top: 60px;
}

.sidebar {
    width: 200px;
    background: #111;
    color: #fff;
    padding: 10px;
    flex-shrink: 0;
}

.menu-btn {
    background: none;
    border: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
}

.main-content {
    flex-grow: 1;
    padding: 20px;
    background: #1a1a1a;
}

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

.image-box {
    width: 150px;
    text-align: center;
    cursor: pointer;
}

.image-box img {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border: 1px solid #ccc;
    background: #eee;
}

.no-image {
    width: 150px;
    height: 150px;
    background: #ccc;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: #fff;
    border: 1px dashed #aaa;
}

.modal {
    position: fixed;
    top: 0; left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 10px;
    overflow: auto;
	
}

.modal-content {
    background: #1a1a1a;
    color: #fff;
	padding: 60px 20px 20px 20px; /* Add more top padding */    width: 100%;
    max-width: 800px;
    border-radius: 10px;
    position: relative;
    overflow-y: auto;
    max-height: 90vh;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 28px;
    cursor: pointer;
    color: #ccc;
    z-index: 10;
}

.thumb {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border: 1px solid #555;
    background: #333;
    margin-right: 10px;
}

.no-thumb {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #ccc;
}

.mobile-menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: #222;
    color: #fff;
    margin-bottom: 5px;
    cursor: pointer;
    border-bottom: 1px solid #444;
}

.spinner {
    border: 5px solid #f3f3f3;
    border-top: 5px solid #444;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 0.8s linear infinite;
    margin: 50px auto;
}

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

.hidden {
    display: none !important;
}

/* Old styles removed - no longer needed */

.loading-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    position: relative;
    text-align: center;
    margin-top: 40px;
}

.ring {
    position: relative;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    animation: ring 2s linear infinite;
    margin-bottom: 10px;
}

@keyframes ring {
    0% {
        transform: rotate(0deg);
        box-shadow: 1px 5px 2px #888;
    }
    50% {
        transform: rotate(180deg);
        box-shadow: 1px 5px 2px #fff;
    }
    100% {
        transform: rotate(360deg);
        box-shadow: 1px 5px 2px #ccc;
    }
}

.ring:before {
    position: absolute;
    content: '';
    left: 0;
    top: 0;
    height: 100%;
    width: 100%;
    border-radius: 50%;
    box-shadow: 0 0 5px rgba(255,255,255,0.2);
}

.loading-text {
    color: #ccc;
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 1px;
    animation: text-fade 2s ease-in-out infinite;
}

@keyframes text-fade {
    50% {
        color: #eee;
    }
}

.topbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: #222;
    color: #fff;
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.logout-btn {
    background: #444;
    color: #fff;
    padding: 5px 10px;
    text-decoration: none;
    border-radius: 5px;
}

.logout-btn:hover {
    background: #666;
}

.login-container {
    max-width: 300px;
    margin: 100px auto;
    background: #1a1a1a;
    padding: 20px;
    border-radius: 8px;
    color: white;
    text-align: center;
}

.login-container input {
    width: 90%;
    margin: 10px 0;
    padding: 10px;
    border: none;
    border-radius: 5px;
}

.login-container button {
    padding: 10px 20px;
    background: #333;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.login-container button:hover {
    background: #555;
}

.error {
    color: red;
}

/* Dashboard Container */
.dashboard-container {
    width: 100%;
    min-height: 100vh;
    background: #1a1a1a;
    overflow-x: hidden;
}

/* Main Content - Full Width */
.dashboard-container .main-content {
    width: 100%;
    max-width: 100%;
    padding: 20px;
    margin: 0 auto;
    display: block !important;
    box-sizing: border-box;
}

/* Content Section */
.content-section {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
}

.section-header {
    margin-bottom: 30px;
}

.section-title {
    font-size: 28px;
    font-weight: bold;
    color: #fff;
    margin: 0;
}

/* Fixtures Grid */
.fixtures-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 25px;
    padding: 20px 0;
}

/* Fixture Card */
.fixture-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    -webkit-tap-highlight-color: rgba(255, 255, 255, 0.1);
    transition: transform 0.2s ease, opacity 0.2s ease;
    padding: 10px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    touch-action: manipulation;
    user-select: none;
    -webkit-user-select: none;
}

.fixture-card:hover,
.fixture-card:active {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
}

/* Fixture Image - 200x200px */
.fixture-image {
    width: 200px;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    border-radius: 8px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.05);
}

.fixture-image img {
    width: 200px;
    height: 200px;
    object-fit: contain;
    display: block;
}

.fixture-image .no-image {
    width: 200px;
    height: 200px;
    background: #333;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: #ccc;
    border: 2px dashed #555;
    border-radius: 8px;
}

.fixture-image .no-image i {
    font-size: 48px;
    margin-bottom: 10px;
    color: #666;
}

/* Fixture Title */
.fixture-title {
    text-align: center;
    font-size: 14px;
    color: #fff;
    font-weight: 500;
    margin-top: 5px;
    word-wrap: break-word;
    max-width: 200px;
}

/* Back Button */
.back-btn {
    background: #444;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: background 0.2s ease;
}

.back-btn:hover {
    background: #666;
}

.back-btn i {
    font-size: 14px;
}

/* Loading and Error States */
.loading {
    text-align: center;
    padding: 40px;
    color: #ccc;
    font-size: 16px;
}

.error {
    color: #ff4444;
    padding: 20px;
    text-align: center;
    background: rgba(255, 68, 68, 0.1);
    border-radius: 5px;
    margin: 20px 0;
}

/* Mobile Responsive Styles */
@media (max-width: 1024px) {
    .fixtures-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .dashboard-container .main-content {
        padding: 15px;
        display: block !important;
    }
    
    .content-section {
        width: 100%;
    }
    
    .section-title {
        font-size: 24px;
    }
    
    .fixtures-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
        gap: 15px;
        padding: 15px 0;
        width: 100%;
        box-sizing: border-box;
    }
    
    .fixture-image {
        width: 180px;
        height: 180px;
    }
    
    .fixture-image img {
        width: 180px;
        height: 180px;
    }
    
    .fixture-image .no-image {
        width: 180px;
        height: 180px;
    }
    
    .fixture-title {
        font-size: 13px;
        max-width: 180px;
    }
}

@media (max-width: 480px) {
    .dashboard-container .main-content {
        padding: 10px;
        display: block !important;
    }
    
    .content-section {
        width: 100%;
        padding: 0;
    }
    
    .section-header {
        margin-bottom: 20px;
    }
    
    .section-title {
        font-size: 20px;
    }
    
    .fixtures-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        padding: 10px 0;
        width: 100%;
        box-sizing: border-box;
    }
    
    .fixture-card {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    .fixture-image {
        width: 100%;
        max-width: 150px;
        height: 150px;
        margin: 0 auto 10px;
    }
    
    .fixture-image img {
        width: 100%;
        height: 150px;
        max-width: 150px;
    }
    
    .fixture-image .no-image {
        width: 100%;
        max-width: 150px;
        height: 150px;
    }
    
    .fixture-title {
        font-size: 11px;
        max-width: 100%;
    }
    
    .back-btn {
        padding: 12px 20px;
        font-size: 16px;
        min-height: 44px; /* Better touch target */
    }
}
