@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap");

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Poppins", sans-serif;
}

body {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%);
    color: white;
    padding-top: 60px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    align-items: center;
    overflow-x: hidden;
}

.logo img {
    margin-top: 10px;
    height: 90px;
    width: auto;
    transition: transform 0.3s ease;
}

.logo img:hover {
    transform: scale(1.05);
}

.navbar {
    position: fixed;
    top: 0;
    width: 100vw;
    height: 60px;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.3s;
}

.menu-toggle:hover {
    color: #2e9afe;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 30px;
}

.nav-links li a {
    color: #fff;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    position: relative;
    padding: 8px 15px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    border-radius: 8px;
}

.nav-links li a:hover {
    color: #2e9afe;
    background: rgba(46, 154, 254, 0.1);
}

.nav-links li a i {
    font-size: 1rem;
}

.container {
    width: 90vw;
    max-width: 1400px;
    margin-top: 100px;
    margin-bottom: 50px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
}

.message {
    padding: 15px 25px;
    border-radius: 12px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    max-width: 600px;
    position: relative;
    animation: slideIn 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message.success {
    background: rgba(16, 185, 129, 0.2);
    border: 1px solid #10b981;
    color: #10b981;
}

.message.error {
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid #ef4444;
    color: #ef4444;
}

.close-message {
    position: absolute;
    right: 15px;
    background: none;
    border: none;
    color: inherit;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.3s;
}

.close-message:hover {
    background: rgba(255, 255, 255, 0.1);
}

.stats-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    width: 100%;
    margin-bottom: 20px;
}

.stat-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 25px;
    display: flex;
    align-items: center;
    gap: 20px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(46, 154, 254, 0.2);
    border-color: rgba(46, 154, 254, 0.5);
}

.stat-card i {
    font-size: 2.5rem;
    color: #2e9afe;
}

.stat-info h3 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.stat-info p {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 400;
}

.upload-section {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 2px dashed rgba(46, 154, 254, 0.5);
    border-radius: 20px;
    padding: 40px;
    width: 100%;
    max-width: 800px;
    transition: all 0.3s ease;
}

.upload-section:hover {
    border-color: #2e9afe;
    box-shadow: 0 8px 30px rgba(46, 154, 254, 0.2);
}

.upload-section h2 {
    text-align: center;
    margin-bottom: 25px;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.upload-area {
    background: rgba(255, 255, 255, 0.03);
    border: 2px dashed rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    padding: 50px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.upload-area:hover,
.upload-area.drag-over {
    background: rgba(46, 154, 254, 0.1);
    border-color: #2e9afe;
}

.upload-icon {
    font-size: 4rem;
    color: #2e9afe;
    margin-bottom: 20px;
}

.upload-area p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1rem;
    margin-bottom: 20px;
}

.upload-area input[type="file"] {
    display: none;
}

.file-label {
    background: linear-gradient(135deg, #2e9afe, #1f7fda);
    color: white;
    padding: 12px 30px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    display: inline-block;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(46, 154, 254, 0.3);
}

.file-label:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(46, 154, 254, 0.4);
}

.file-name-display {
    margin-top: 20px;
    display: none;
    text-align: left;
}

.file-item {
    background: rgba(255, 255, 255, 0.05);
    padding: 12px 15px;
    border-radius: 8px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: rgba(255, 255, 255, 0.9);
}

.file-item i {
    color: #2e9afe;
}

.upload-button {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    border: none;
    padding: 14px 40px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    font-size: 1rem;
    margin-top: 20px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
    margin-right: auto;
}

.upload-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

.controls-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    gap: 20px;
    flex-wrap: wrap;
}

.search-box {
    flex: 1;
    min-width: 250px;
    position: relative;
    display: flex;
    align-items: center;
}

.search-box i {
    position: absolute;
    left: 15px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 1.1rem;
}

.search-box input {
    width: 100%;
    padding: 14px 20px 14px 45px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: white;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.search-box input:focus {
    outline: none;
    border-color: #2e9afe;
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 20px rgba(46, 154, 254, 0.2);
}

.search-box input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.view-toggle {
    display: flex;
    gap: 10px;
    background: rgba(255, 255, 255, 0.05);
    padding: 5px;
    border-radius: 10px;
}

.view-btn {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    padding: 10px 15px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.2rem;
}

.view-btn:hover {
    color: white;
    background: rgba(255, 255, 255, 0.1);
}

.view-btn.active {
    background: #2e9afe;
    color: white;
}

.table-view {
    width: 100%;
    display: none;
    animation: fadeIn 0.3s ease;
}

.table-view.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.file-table {
    width: 100%;
    border-collapse: collapse;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.file-table th,
.file-table td {
    padding: 18px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.file-table th {
    background: rgba(46, 154, 254, 0.1);
    font-weight: 600;
    color: #2e9afe;
    cursor: pointer;
    user-select: none;
    transition: background 0.3s ease;
}

.file-table th:hover {
    background: rgba(46, 154, 254, 0.2);
}

.file-table th i {
    margin-right: 8px;
}

.file-table tbody tr {
    transition: all 0.3s ease;
}

.file-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.05);
}

.file-table tbody tr:last-child td {
    border-bottom: none;
}

.file-icon {
    margin-right: 10px;
    font-size: 1.2rem;
    color: #2e9afe;
}

.no-files {
    text-align: center;
    padding: 50px 20px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 1.1rem;
}

.no-files i {
    font-size: 3rem;
    display: block;
    margin-bottom: 15px;
    opacity: 0.3;
}

.grid-view {
    width: 100%;
    display: none;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    animation: fadeIn 0.3s ease;
}

.grid-view.active {
    display: grid;
}

.file-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 25px;
    text-align: center;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.file-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(46, 154, 254, 0.2);
    border-color: rgba(46, 154, 254, 0.5);
}

.file-card-icon i {
    font-size: 4rem;
    color: #2e9afe;
    margin-bottom: 10px;
}

.file-card-name {
    font-weight: 600;
    font-size: 1rem;
    word-break: break-word;
    color: white;
}

.file-card-size {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
}

.file-card-date {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.85rem;
}

.file-card-actions {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 10px;
}

.actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.btn-action {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 10px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.btn-action:hover {
    transform: translateY(-2px);
}

.btn-download {
    background: rgba(16, 185, 129, 0.2);
    border-color: #10b981;
}

.btn-download:hover {
    background: #10b981;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.btn-view {
    background: rgba(59, 130, 246, 0.2);
    border-color: #3b82f6;
}

.btn-view:hover {
    background: #3b82f6;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.btn-rename {
    background: rgba(251, 146, 60, 0.2);
    border-color: #fb923c;
}

.btn-rename:hover {
    background: #fb923c;
    box-shadow: 0 4px 15px rgba(251, 146, 60, 0.3);
}

.btn-delete {
    background: rgba(239, 68, 68, 0.2);
    border-color: #ef4444;
}

.btn-delete:hover {
    background: #ef4444;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
}

.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: linear-gradient(135deg, #1e293b, #334155);
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    max-width: 450px;
    width: 90%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-content h3 {
    color: #ef4444;
    margin-bottom: 20px;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.modal-content p {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 30px;
    font-size: 1rem;
}

.modal-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.btn-cancel,
.btn-confirm {
    padding: 12px 30px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-cancel {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-cancel:hover {
    background: rgba(255, 255, 255, 0.2);
}

.btn-confirm {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
}

.btn-confirm:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.4);
}

.rename-input-group {
    display: flex;
    align-items: center;
    gap: 5px;
    margin: 25px 0;
}

.rename-input-group input {
    flex: 1;
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: white;
    font-size: 1rem;
    outline: none;
    transition: all 0.3s;
}

.rename-input-group input:focus {
    border-color: #2e9afe;
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 3px rgba(46, 154, 254, 0.1);
}

.file-extension {
    color: rgba(255, 255, 255, 0.6);
    font-weight: 500;
    padding: 0 5px;
}

#rename-modal .modal-content h3 {
    color: #fb923c;
}

@media (max-width: 768px) {
    .menu-toggle { display: block; }
    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 60px;
        left: 0;
        width: 100%;
        background: rgba(0, 0, 0, 0.95);
        padding: 20px 0;
        gap: 10px;
    }
    .nav-links.active { display: flex; }
    .nav-links li a {
        padding: 12px 20px;
        width: 100%;
        justify-content: center;
    }
    .container {
        margin-top: 80px;
        width: 95%;
    }
    .stats-section { grid-template-columns: 1fr; }
    .controls-section {
        flex-direction: column;
        align-items: stretch;
    }
    .search-box { width: 100%; }
    .view-toggle { justify-content: center; }
    .file-table { font-size: 0.85rem; }
    .file-table th,
    .file-table td { padding: 12px 8px; }
    .grid-view {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
        gap: 15px;
    }
    .upload-section { padding: 25px; }
    .upload-area { padding: 30px 15px; }
    .upload-icon { font-size: 3rem; }
    .modal-content { padding: 30px 20px; }
    .modal-actions {
        flex-direction: column;
        gap: 10px;
    }
    .btn-cancel,
    .btn-confirm { width: 100%; }
}

@media (max-width: 480px) {
    .logo img { height: 60px; }
    .stat-card { padding: 20px; }
    .stat-card i { font-size: 2rem; }
    .stat-info h3 { font-size: 1.5rem; }
    .file-table th,
    .file-table td {
        padding: 10px 5px;
        font-size: 0.75rem;
    }
    .btn-action {
        padding: 8px 10px;
        font-size: 0.9rem;
    }
}
