* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial Black', 'Arial', sans-serif;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 25%, #ff4500 50%, #dc143c 75%, #1a1a1a 100%);
    background-size: 400% 400%;
    animation: gymGradient 8s ease infinite;
    min-height: 100vh;
    color: #fff;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

@keyframes gymGradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.screen {
    display: none;
    animation: fadeIn 0.5s ease-in;
}

.screen.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Login Screen */
.login-card {
    background: linear-gradient(145deg, #1a1a1a, #2d2d2d);
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(255,69,0,0.3), 0 0 0 2px #ff4500;
    text-align: center;
    max-width: 400px;
    margin: 100px auto;
    border: 3px solid #dc143c;
    position: relative;
    overflow: hidden;
}

.login-card::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #ff4500, #dc143c, #ff4500);
    border-radius: 20px;
    z-index: -1;
    animation: borderGlow 3s ease-in-out infinite alternate;
}

@keyframes borderGlow {
    from { opacity: 0.5; }
    to { opacity: 1; }
}

.login-card h1 {
    color: #ff4500;
    margin-bottom: 10px;
    font-size: 2.5em;
    text-shadow: 0 0 20px #ff4500, 2px 2px 4px rgba(0,0,0,0.8);
    font-weight: 900;
}

.login-card p {
    color: #ffcc99;
    margin-bottom: 30px;
    font-weight: bold;
}

#loginForm input {
    width: 100%;
    padding: 15px;
    border: 3px solid #ff4500;
    border-radius: 10px;
    font-size: 16px;
    margin-bottom: 20px;
    background: #1a1a1a;
    color: #fff;
    font-weight: bold;
    transition: all 0.3s;
    box-shadow: inset 0 0 10px rgba(255,69,0,0.2);
}

#loginForm input:focus {
    outline: none;
    border-color: #dc143c;
    box-shadow: 0 0 20px rgba(255,69,0,0.5), inset 0 0 10px rgba(255,69,0,0.3);
}

#loginForm input::placeholder {
    color: #ffcc99;
}

#loginForm button {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #ff4500 0%, #dc143c 50%, #ff4500 100%);
    background-size: 200% 200%;
    animation: buttonPulse 2s ease-in-out infinite;
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 900;
    cursor: pointer;
    transition: all 0.3s;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
    box-shadow: 0 5px 15px rgba(255,69,0,0.4);
}

@keyframes buttonPulse {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

#loginForm button:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 25px rgba(255,69,0,0.6);
}

.error-message {
    color: #ff6b6b;
    margin-top: 15px;
    display: none;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
}

/* Header */
.header {
    background: linear-gradient(145deg, #1a1a1a, #2d2d2d);
    padding: 20px 30px;
    border-radius: 15px;
    margin-bottom: 30px;
    box-shadow: 0 5px 15px rgba(255,69,0,0.3), 0 0 0 2px #ff4500;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 2px solid #dc143c;
    position: relative;
}

.header::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #ff4500, #dc143c, #ff4500);
    border-radius: 15px;
    z-index: -1;
    opacity: 0.7;
}

.header h1 {
    color: #ff4500;
    font-size: 2em;
    text-shadow: 0 0 15px #ff4500, 2px 2px 4px rgba(0,0,0,0.8);
    font-weight: 900;
}

.logout-btn {
    background: linear-gradient(135deg, #dc143c, #ff4500);
    color: white;
    border: 2px solid #ff4500;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 900;
    transition: all 0.3s;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
    box-shadow: 0 3px 10px rgba(220,20,60,0.4);
}

.logout-btn:hover {
    background: linear-gradient(135deg, #ff4500, #dc143c);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(220,20,60,0.6);
}

/* Upload Section */
.upload-section {
    background: linear-gradient(145deg, #1a1a1a, #2d2d2d);
    padding: 30px;
    border-radius: 15px;
    margin-bottom: 30px;
    box-shadow: 0 5px 15px rgba(255,69,0,0.3), 0 0 0 2px #ff4500;
    border: 2px solid #dc143c;
}

.upload-section h2 {
    color: #ff4500;
    margin-bottom: 20px;
    text-shadow: 0 0 10px #ff4500, 2px 2px 4px rgba(0,0,0,0.8);
    font-weight: 900;
}

.upload-area {
    border: 3px dashed #ff4500;
    border-radius: 15px;
    padding: 60px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    background: linear-gradient(145deg, #2d2d2d, #1a1a1a);
    position: relative;
    overflow: hidden;
}

.upload-area::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,69,0,0.1), transparent);
    transition: left 0.5s;
}

.upload-area:hover::before {
    left: 100%;
}

.upload-area:hover {
    border-color: #dc143c;
    background: linear-gradient(145deg, #2a2a2a, #1f1f1f);
    transform: scale(1.02);
    box-shadow: 0 0 30px rgba(255,69,0,0.3);
}

.upload-area.dragover {
    border-color: #dc143c;
    background: linear-gradient(145deg, #2a2a2a, #1f1f1f);
    transform: scale(1.05);
    box-shadow: 0 0 40px rgba(255,69,0,0.5);
}

.upload-icon {
    font-size: 4em;
    margin-bottom: 20px;
    filter: drop-shadow(0 0 10px #ff4500);
}

.upload-area p {
    font-size: 1.2em;
    color: #ffcc99;
    margin-bottom: 10px;
    font-weight: bold;
}

.upload-hint {
    font-size: 0.9em !important;
    color: #ff9900 !important;
    font-weight: bold !important;
}

/* Progress Bar */
.upload-progress {
    margin-top: 20px;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e1e1e1;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #ff4500, #dc143c, #ff4500);
    background-size: 200% 100%;
    animation: progressFlow 2s ease-in-out infinite;
    width: 0%;
    transition: width 0.3s;
    box-shadow: 0 0 10px rgba(255,69,0,0.5);
}

@keyframes progressFlow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Files Grid */
.files-section {
    background: linear-gradient(145deg, #1a1a1a, #2d2d2d);
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(255,69,0,0.3), 0 0 0 2px #ff4500;
    border: 2px solid #dc143c;
}

.files-section h2 {
    color: #ff4500;
    margin-bottom: 20px;
    text-shadow: 0 0 10px #ff4500, 2px 2px 4px rgba(0,0,0,0.8);
    font-weight: 900;
}

.search-bar {
    display: flex;
    margin-bottom: 20px;
    gap: 10px;
}

.search-bar input {
    flex: 1;
    padding: 12px;
    border: 2px solid #ff4500;
    border-radius: 8px;
    font-size: 14px;
    background: #1a1a1a;
    color: #fff;
    font-weight: bold;
}

.search-bar input:focus {
    outline: none;
    border-color: #dc143c;
    box-shadow: 0 0 15px rgba(255,69,0,0.5);
}

.search-bar input::placeholder {
    color: #ffcc99;
}

.search-bar button {
    padding: 12px 20px;
    background: linear-gradient(135deg, #ff4500, #dc143c);
    color: white;
    border: 2px solid #ff4500;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 900;
    transition: all 0.3s;
}

.search-bar button:hover {
    background: linear-gradient(135deg, #dc143c, #ff4500);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255,69,0,0.4);
}

.files-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.file-card {
    background: linear-gradient(145deg, #2d2d2d, #1a1a1a);
    border: 2px solid #ff4500;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.file-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,69,0,0.1), transparent);
    transition: left 0.5s;
}

.file-card:hover::before {
    left: 100%;
}

.file-card:hover {
    transform: translateY(-8px) scale(1.03);
    box-shadow: 0 15px 35px rgba(255,69,0,0.4);
    border-color: #dc143c;
}

.file-icon {
    font-size: 3em;
    margin-bottom: 15px;
    filter: drop-shadow(0 0 8px #ff4500);
}

.file-name {
    font-weight: 900;
    margin-bottom: 10px;
    color: #fff;
    word-break: break-word;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
}

.file-info {
    color: #ffcc99;
    font-size: 0.9em;
    margin-bottom: 15px;
    font-weight: bold;
}

.file-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.btn {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9em;
    font-weight: bold;
    transition: all 0.3s;
}

.btn-primary {
    background: linear-gradient(135deg, #ff4500, #dc143c);
    color: white;
    border: 1px solid #ff4500;
    font-weight: 900;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #dc143c, #ff4500);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255,69,0,0.4);
}

.btn-success {
    background: linear-gradient(135deg, #ff9900, #ff4500);
    color: white;
    border: 1px solid #ff9900;
    font-weight: 900;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
}

.btn-success:hover {
    background: linear-gradient(135deg, #ff4500, #ff9900);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255,153,0,0.4);
}

.btn-danger {
    background: linear-gradient(135deg, #dc143c, #8b0000);
    color: white;
    border: 1px solid #dc143c;
    font-weight: 900;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
}

.btn-danger:hover {
    background: linear-gradient(135deg, #8b0000, #dc143c);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(220,20,60,0.4);
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .login-card {
        margin: 50px auto;
        padding: 30px 20px;
    }
    
    .header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .files-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 15px;
    }
    
    .upload-area {
        padding: 40px 15px;
    }
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #ff4500;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Video Player Styling */
video {
    box-shadow: 0 10px 30px rgba(255,69,0,0.3);
    border: 3px solid #ff4500;
    transition: all 0.3s;
}

video:hover {
    box-shadow: 0 15px 40px rgba(255,69,0,0.5);
    transform: scale(1.02);
}

/* Video Controls Styling */
video::-webkit-media-controls-panel {
    background: linear-gradient(135deg, #1a1a1a, #2d2d2d);
}

video::-webkit-media-controls-play-button,
video::-webkit-media-controls-pause-button {
    background-color: #ff4500;
    border-radius: 50%;
}

video::-webkit-media-controls-volume-slider {
    background: #ff4500;
}

video::-webkit-media-controls-timeline {
    background: #ff4500;
}

/* Admin Panel Styling */
.admin-section {
    background: linear-gradient(145deg, #1a1a1a, #2d2d2d);
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(255,69,0,0.3), 0 0 0 2px #ff4500;
    border: 2px solid #dc143c;
}

.admin-section h2 {
    color: #ff4500;
    margin-bottom: 20px;
    text-shadow: 0 0 10px #ff4500, 2px 2px 4px rgba(0,0,0,0.8);
    font-weight: 900;
}

.admin-section h3 {
    color: #ffcc99;
    margin-bottom: 15px;
    font-weight: 900;
}

/* Admin Stats Cards */
.admin-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: linear-gradient(145deg, #2d2d2d, #1a1a1a);
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    border: 2px solid #ff4500;
    transition: all 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(255,69,0,0.4);
    border-color: #dc143c;
}

.stat-number {
    font-size: 2.5em;
    font-weight: 900;
    color: #ff4500;
    text-shadow: 0 0 15px #ff4500, 2px 2px 4px rgba(0,0,0,0.8);
    margin-bottom: 10px;
}

.stat-label {
    color: #ffcc99;
    font-weight: bold;
    font-size: 1.1em;
}

/* Login History Section */
.login-history-section {
    margin-top: 30px;
}

.login-history {
    max-height: 500px;
    overflow-y: auto;
    border: 2px solid #ff4500;
    border-radius: 12px;
    background: linear-gradient(145deg, #2d2d2d, #1a1a1a);
}

.login-record {
    padding: 20px;
    border-bottom: 1px solid #ff4500;
    transition: all 0.3s;
}

.login-record:last-child {
    border-bottom: none;
}

.login-record:hover {
    background: rgba(255,69,0,0.1);
}

.login-record.success {
    border-left: 5px solid #27ae60;
}

.login-record.failed {
    border-left: 5px solid #e74c3c;
}

.login-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.login-type {
    background: linear-gradient(135deg, #ff4500, #dc143c);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-weight: 900;
    font-size: 0.9em;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
}

.login-record.failed .login-type {
    background: linear-gradient(135deg, #e74c3c, #8b0000);
}

.login-time {
    color: #ffcc99;
    font-weight: bold;
    font-size: 0.9em;
}

.login-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 10px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
}

.detail-row .label {
    color: #ff9900;
    font-weight: bold;
    font-size: 0.9em;
}

.detail-row .value {
    color: #fff;
    font-weight: 500;
    font-size: 0.9em;
    word-break: break-all;
}

/* Scrollbar Styling for Login History */
.login-history::-webkit-scrollbar {
    width: 8px;
}

.login-history::-webkit-scrollbar-track {
    background: #1a1a1a;
    border-radius: 4px;
}

.login-history::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #ff4500, #dc143c);
    border-radius: 4px;
}

.login-history::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #dc143c, #ff4500);
}

/* Responsive Design for Admin Panel */
@media (max-width: 768px) {
    .admin-stats {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 15px;
    }
    
    .stat-number {
        font-size: 2em;
    }
    
    .login-details {
        grid-template-columns: 1fr;
    }
    
    .login-header {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
}
