* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f4f4f4;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Styles - Enhanced Server Compatibility */
.navbar {
    /* Primary gradient for modern browsers */
    background: linear-gradient(135deg, #ff6b6b 0%, #4ecdc4 25%, #45b7d1 50%, #96ceb4 75%, #feca57 100%);
    background: -webkit-linear-gradient(135deg, #ff6b6b 0%, #4ecdc4 25%, #45b7d1 50%, #96ceb4 75%, #feca57 100%);
    background: -moz-linear-gradient(135deg, #ff6b6b 0%, #4ecdc4 25%, #45b7d1 50%, #96ceb4 75%, #feca57 100%);
    background: -o-linear-gradient(135deg, #ff6b6b 0%, #4ecdc4 25%, #45b7d1 50%, #96ceb4 75%, #feca57 100%);
    
    /* Fallback colors for older browsers */
    background-color: #ff6b6b;
    
    /* Animation properties */
    background-size: 300% 300%;
    -webkit-animation: gradientShift 8s ease infinite;
    -moz-animation: gradientShift 8s ease infinite;
    animation: gradientShift 8s ease infinite;
    
    /* Layout properties */
    padding: 1rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    -webkit-box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    -moz-box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

/* Ensure gradient animation works across browsers */
@-webkit-keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

@-moz-keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0 20px;
    flex-wrap: wrap;
    gap: 2rem;
}

.nav-logo {
    flex: 0 0 auto;
}

.nav-logo h1 {
    color: #fff;
    font-size: 1.5rem;
    text-align: center;
    margin: 0;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
    margin: 0;
    padding: 0;
}

/* Mobile responsive centering */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .nav-menu {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .nav-menu a {
        font-size: 0.9rem;
        padding: 0.4rem 0.8rem;
    }
}

/* Hide hamburger menu since we're centering */
.hamburger {
    display: none;
}

.nav-menu a {
    color: #fff;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    transition: background-color 0.3s;
}

.nav-menu a:hover {
    background-color: rgba(255,255,255,0.1);
}

/* Main Content */
main {
    margin-top: 80px;
}

.section {
    padding: 3rem 0;
    background: #fff;
    margin-bottom: 2rem;
}

.section-title {
    text-align: center;
    margin-bottom: 2rem;
    color: #2c3e50;
    font-size: 2.5rem;
}

/* Admin Section Styles */
.admin-section {
    background: #f8f9fa;
    border-top: 4px solid #e74c3c;
}

.admin-login {
    max-width: 400px;
    margin: 0 auto;
    background: #fff;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.login-form h3 {
    text-align: center;
    margin-bottom: 1.5rem;
    color: #2c3e50;
}

.form-group {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    flex: 1;
    padding: 0.8rem;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
}

.btn-login {
    width: 100%;
    padding: 1rem;
    background: #e74c3c;
    color: #fff;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn-login:hover {
    background: #c0392b;
}

/* CRITICAL: Server-Compatible Upload Layout - Forces Correct Structure */

/* Admin Panel Container */
.admin-panel {
    background: #fff;
    border-radius: 10px;
    padding: 2rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    display: block;
    position: relative;
    overflow: visible;
    z-index: 1;
}

/* Upload Grid - Main Container */
.upload-grid {
    display: block;
    width: 100%;
    margin: 2rem 0 0 0;
    padding: 0;
    position: relative;
    overflow: visible;
    z-index: 2;
}

/* Upload Category Container */
.upload-category {
    display: block;
    width: 100%;
    margin: 0 0 4rem 0;
    padding: 2rem;
    background: #f8f9fa;
    border-radius: 10px;
    border: 1px solid #e9ecef;
    box-sizing: border-box;
    position: relative;
    overflow: visible;
    z-index: 3;
}

.upload-category h4 {
    display: block;
    width: 100%;
    margin: 0 0 2rem 0;
    padding: 0 0 1rem 0;
    color: #2c3e50;
    font-size: 1.4rem;
    text-align: center;
    border-bottom: 2px solid #e9ecef;
    position: relative;
    z-index: 4;
}

/* Upload Items Grid - CRITICAL LAYOUT */
.upload-items {
    display: block;
    width: 100%;
    margin: 0;
    padding: 0;
    position: relative;
    overflow: visible;
    z-index: 5;
}

/* Force desktop 2-column layout */
@media (min-width: 768px) {
    .upload-items {
        display: grid;
        grid-template-columns: 1fr 1fr;
        grid-gap: 2rem;
        gap: 2rem;
    }
}

/* Mobile single column */
@media (max-width: 767px) {
    .upload-items {
        display: block;
    }
    
    .upload-item {
        margin-bottom: 2rem;
    }
}

/* Individual Upload Item */
.upload-item {
    display: block;
    width: 100%;
    margin: 0;
    padding: 1.5rem;
    background: #ffffff;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    box-sizing: border-box;
    position: relative;
    min-height: 450px;
    overflow: visible;
    z-index: 6;
}

.upload-item:hover {
    border-color: #3498db;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* Upload Header */
.upload-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin: 0 0 1.5rem 0;
    padding: 0 0 1rem 0;
    border-bottom: 1px solid #f1f1f1;
    position: relative;
    z-index: 7;
}

.upload-header h5 {
    margin: 0;
    padding: 0;
    color: #2c3e50;
    font-size: 1.2rem;
    font-weight: bold;
}

.upload-status {
    padding: 0.4rem 1rem;
    border-radius: 15px;
    font-size: 0.85rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.upload-status.empty {
    background: #f39c12;
    color: #fff;
}

.upload-status.uploaded {
    background: #27ae60;
    color: #fff;
}

/* Upload Form */
.upload-form {
    display: block;
    width: 100%;
    margin: 0;
    padding: 0;
    position: relative;
    z-index: 8;
}

.upload-form input[type="text"],
.upload-form input[type="number"],
.upload-form textarea {
    display: block;
    width: 100%;
    margin: 0 0 1rem 0;
    padding: 0.9rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    box-sizing: border-box;
    position: relative;
}

.upload-form input:focus,
.upload-form textarea:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.upload-form textarea {
    min-height: 80px;
    resize: vertical;
    font-family: inherit;
}

/* File Upload Section */
.file-upload {
    display: block;
    width: 100%;
    margin: 0 0 1.5rem 0;
    padding: 1rem;
    background: #f8f9fa;
    border: 2px dashed #ddd;
    border-radius: 8px;
    text-align: center;
    position: relative;
    z-index: 9;
}

.file-upload input[type="file"] {
    display: none;
}

.file-upload button {
    display: inline-block;
    margin: 0 0 1rem 0;
    padding: 0.8rem 1.5rem;
    background: #3498db;
    color: #fff;
    border: none;
    border-radius: 5px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s;
}

.file-upload button:hover {
    background: #2980b9;
}

.file-name {
    display: block;
    width: 100%;
    padding: 0.5rem;
    color: #666;
    font-style: italic;
    background: #fff;
    border-radius: 4px;
    border: 1px solid #eee;
    text-align: center;
    font-size: 0.9rem;
}

/* Action Buttons */
.btn-upload {
    display: block;
    width: 100%;
    margin: 1rem 0 0 0;
    padding: 1rem;
    background: #27ae60;
    color: #fff;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s;
    position: relative;
    z-index: 10;
}

.btn-upload:hover {
    background: #229954;
}

.btn-remove {
    display: block;
    width: 100%;
    margin: 0.5rem 0 0 0;
    padding: 0.8rem;
    background: #e74c3c;
    color: #fff;
    border: none;
    border-radius: 5px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn-remove:hover {
    background: #c0392b;
}

/* Clear floats and reset positioning */
.upload-grid::after,
.upload-category::after,
.upload-items::after {
    content: "";
    display: table;
    clear: both;
}

/* Force all upload elements to use relative positioning */
.upload-grid,
.upload-category,
.upload-items,
.upload-item,
.upload-header,
.upload-form,
.file-upload {
    position: relative;
    float: none;
}

/* Prevent any unwanted transforms or absolute positioning */
.upload-grid *,
.upload-category *,
.upload-items *,
.upload-item * {
    transform: none;
    position: relative;
}

.admin-panel {
    background: #fff;
    border-radius: 10px;
    padding: 2rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #eee;
}

.admin-header h3 {
    margin: 0;
    color: #2c3e50;
}

.btn-logout {
    padding: 0.5rem 1rem;
    background: #95a5a6;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.upload-grid {
    display: block;
    gap: 2rem;
    margin-top: 2rem;
    width: 100%;
    clear: both;
}

.upload-category {
    margin-bottom: 3rem;
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 10px;
    border: 1px solid #e9ecef;
}

.upload-category h4 {
    color: #2c3e50;
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
    text-align: center;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e9ecef;
}

.upload-items {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin-top: 1rem;
    width: 100%;
}

/* For smaller screens, single column */
@media (max-width: 768px) {
    .upload-items {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

.upload-item {
    background: #fff;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 1.5rem;
    transition: border-color 0.3s, box-shadow 0.3s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    width: 100%;
    box-sizing: border-box;
    min-height: 400px;
    display: flex;
    flex-direction: column;
}

.upload-item:hover {
    border-color: #3498db;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.upload-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #f1f1f1;
}

.upload-header h5 {
    margin: 0;
    color: #2c3e50;
    font-size: 1.1rem;
    font-weight: bold;
}

.upload-status {
    padding: 0.3rem 0.8rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: bold;
    text-transform: uppercase;
}

.upload-status.empty {
    background: #f39c12;
    color: #fff;
}

.upload-status.uploaded {
    background: #27ae60;
    color: #fff;
}

.upload-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    flex: 1;
}

.upload-form input,
.upload-form textarea {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    box-sizing: border-box;
}

.upload-form input:focus,
.upload-form textarea:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.upload-form textarea {
    min-height: 80px;
    resize: vertical;
}

.file-upload {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.file-upload input[type="file"] {
    display: none;
}

.file-upload button {
    background: #3498db;
    color: #fff;
    border: none;
    padding: 0.8rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.3s;
}

.file-upload button:hover {
    background: #2980b9;
}

.file-name {
    font-size: 0.9rem;
    color: #666;
    font-style: italic;
    padding: 0.5rem;
    background: #f8f9fa;
    border-radius: 4px;
    text-align: center;
}

.btn-upload {
    background: #27ae60 !important;
    color: #fff !important;
    border: none;
    padding: 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    font-size: 1rem;
    transition: background-color 0.3s;
    margin-top: 0.5rem;
}

.btn-upload:hover {
    background: #229954 !important;
}

.btn-remove {
    background: #e74c3c !important;
    color: #fff !important;
    border: none;
    padding: 0.8rem;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    margin-top: 0.5rem;
}

.btn-remove:hover {
    background: #c0392b !important;
}

/* Products Section */
.products-section {
    margin-top: 3rem;
    padding: 2rem 0;
    background: #f8f9fa;
    border-radius: 10px;
}

.section-subtitle {
    color: #2c3e50;
    margin-bottom: 2rem;
    font-size: 1.8rem;
    text-align: center;
}

.products-grid {
    margin-top: 2rem;
}

.product-category {
    margin-bottom: 3rem;
}

.product-category h3,
.product-category h4 {
    color: #2c3e50;
    margin-bottom: 1.5rem;
    font-size: 1.6rem;
}

.products-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.product-card {
    background: #fff;
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    border: 2px solid transparent;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.product-card.paid {
    border-color: #f39c12;
}

.product-card.free {
    border-color: #27ae60;
}

.product-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.product-header h4 {
    color: #2c3e50;
    font-size: 1.2rem;
    margin: 0;
}

.price {
    font-weight: bold;
    font-size: 1.1rem;
}

.price.paid {
    color: #f39c12;
}

.price.free {
    color: #27ae60;
}

.product-content {
    margin-bottom: 1rem;
}

.product-description {
    color: #666;
    margin-top: 0.5rem;
    font-style: italic;
}

.upload-date {
    color: #999;
    font-size: 0.8rem;
    display: block;
    margin-top: 0.5rem;
}

/* Games Section */
.registration-form {
    max-width: 600px;
    margin: 0 auto 3rem;
    background: #fff;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.games-area {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 10px;
    margin-top: 2rem;
}

.game-section {
    background: #fff;
    padding: 2rem;
    margin-bottom: 2rem;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

.number-selector {
    margin: 1rem 0;
}

.numbers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(40px, 1fr));
    gap: 0.5rem;
    margin: 1rem 0;
    max-width: 500px;
}

.number-btn {
    padding: 0.5rem;
    background: #ecf0f1;
    border: 1px solid #bdc3c7;
    border-radius: 5px;
    cursor: pointer;
    text-align: center;
    transition: all 0.3s;
}

.number-btn:hover {
    background: #d5dbdb;
}

.number-btn.selected {
    background: #3498db;
    color: #fff;
}

.selected-numbers {
    margin: 1rem 0;
    font-weight: bold;
}

.btn-generate {
    background: #e74c3c;
    color: #fff;
    border: none;
    padding: 1rem 2rem;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.3s;
}

.btn-generate:hover {
    background: #c0392b;
}

.results-area {
    margin-top: 2rem;
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 0.5rem;
    margin-top: 1rem;
}

.result-item {
    background: #2ecc71;
    color: #fff;
    padding: 0.5rem;
    text-align: center;
    border-radius: 5px;
    font-weight: bold;
}

.checkers-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.checker {
    background: #fff;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

.checker-input {
    display: flex;
    gap: 0.5rem;
    margin: 1rem 0;
}

.checker-input input {
    flex: 1;
    padding: 0.7rem;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.btn-check {
    background: #3498db;
    color: #fff;
    border: none;
    padding: 0.7rem 1rem;
    border-radius: 4px;
    cursor: pointer;
}

.check-result {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 5px;
    font-weight: bold;
}

.check-result.win {
    background: #d4edda;
    color: #155724;
}

.check-result.lose {
    background: #f8d7da;
    color: #721c24;
}

/* Contact Section */
.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
}

.contact-info h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
}

.contact-details {
    margin-top: 2rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.contact-item i {
    color: #3498db;
    font-size: 1.2rem;
}

.contact-form {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 10px;
}

.btn-register,
.btn-send {
    width: 100%;
    padding: 1rem;
    background: #27ae60;
    color: #fff;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s;
    font-weight: bold;
}

.btn-register:hover,
.btn-send:hover {
    background: #229954;
}

.btn-download {
    width: 100%;
    padding: 1rem;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s;
    font-size: 1rem;
}

.btn-download.paid-download {
    background: #f39c12;
    color: #fff;
}

.btn-download.paid-download:hover {
    background: #e67e22;
}

.btn-download.free-download {
    background: #27ae60;
    color: #fff;
}

.btn-download.free-download:hover {
    background: #229954;
}

.btn-download:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: #fefefe;
    margin: 10% auto;
    padding: 2rem;
    border-radius: 10px;
    width: 90%;
    max-width: 500px;
    position: relative;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    right: 15px;
    top: 10px;
}

.close:hover {
    color: #000;
}

.payment-info {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 5px;
    margin: 1rem 0;
}

.payment-instructions {
    margin: 1rem 0;
}

.payment-instructions p {
    margin-bottom: 0.5rem;
    padding-left: 1rem;
}

.btn-copy-pix,
.btn-simulate-payment,
.btn-ok {
    width: 100%;
    padding: 1rem;
    margin: 0.5rem 0;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
}

.btn-copy-pix {
    background: #3498db;
    color: #fff;
}

.btn-simulate-payment {
    background: #f39c12;
    color: #fff;
}

.btn-ok {
    background: #27ae60;
    color: #fff;
}

/* Utility Classes */
.hidden {
    display: none !important;
}

.text-center {
    text-align: center;
}

.mt-2 {
    margin-top: 1rem;
}

.mb-2 {
    margin-bottom: 1rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .upload-items {
        grid-template-columns: 1fr;
    }
    
    .products-row {
        grid-template-columns: 1fr;
    }
    
    .form-group {
        flex-direction: column;
    }
}

/* Animation for success messages */
.success-message {
    background: #d4edda;
    color: #155724;
    padding: 1rem;
    border-radius: 5px;
    margin: 1rem 0;
    border: 1px solid #c3e6cb;
}

.error-message {
    background: #f8d7da;
    color: #721c24;
    padding: 1rem;
    border-radius: 5px;
    margin: 1rem 0;
    border: 1px solid #f5c6cb;
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Enhanced Upload Grid for Server Compatibility */
.upload-grid {
    display: block !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    clear: both !important;
    overflow: hidden !important;
}

.upload-category {
    display: block !important;
    width: 100% !important;
    margin-bottom: 3rem !important;
    background: #f8f9fa !important;
    padding: 1.5rem !important;
    border-radius: 10px !important;
    border: 1px solid #e9ecef !important;
    box-sizing: border-box !important;
    clear: both !important;
    float: none !important;
}

.upload-items {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 2rem !important;
    margin-top: 1rem !important;
    width: 100% !important;
    box-sizing: border-box !important;
    clear: both !important;
}

/* Force two-column layout for upload items */
@media (min-width: 769px) {
    .upload-items {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* Single column for mobile */
@media (max-width: 768px) {
    .upload-items {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }
}

.upload-item {
    background: #fff !important;
    border: 2px solid #e9ecef !important;
    border-radius: 8px !important;
    padding: 1.5rem !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1) !important;
    width: 100% !important;
    box-sizing: border-box !important;
    min-height: 400px !important;
    display: flex !important;
    flex-direction: column !important;
    position: relative !important;
    float: none !important;
    clear: none !important;
}

.upload-form {
    display: flex !important;
    flex-direction: column !important;
    gap: 1rem !important;
    flex: 1 !important;
    width: 100% !important;
}

.upload-form input,
.upload-form textarea {
    width: 100% !important;
    box-sizing: border-box !important;
}

/* Force clear floats and prevent stacking issues */
.admin-panel::after,
.upload-grid::after,
.upload-category::after,
.upload-items::after {
    content: "" !important;
    display: table !important;
    clear: both !important;
}

/* Prevent any absolute positioning that might cause stacking */
.upload-item,
.upload-form,
.upload-header {
    position: relative !important;
}