* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: radial-gradient(ellipse at top, #1a1a1a 0%, #0a0a0a 60%, #050505 100%);
    min-height: 100vh;
    color: #e8e8e8;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.login-box {
    background: #333333;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    max-width: 400px;
    margin: 100px auto;
}

.login-box h1 {
    text-align: center;
    color: #e8d9a8;
    margin-bottom: 30px;
    font-size: 28px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #c5c5c5;
    font-weight: 500;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid rgba(212, 175, 55, 0.2);
    border-radius: 10px;
    font-size: 16px;
    background: rgba(0, 0, 0, 0.3);
    color: #e8e8e8;
    transition: all 0.3s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #d4af37;
    box-shadow: 0 0 0 4px rgba(212, 175, 55, 0.15);
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 0;
}

.btn-primary {
    background: linear-gradient(135deg, #d4af37 0%, #b8941f 100%);
    color: #000;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(212, 175, 55, 0.4);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.06);
    color: #000;
}

.btn-danger {
    background: linear-gradient(135deg, #f5576c 0%, #f093fb 100%);
    color: white;
}

.btn-success {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    color: white;
}

.btn-warning {
    background: linear-gradient(135deg, #ffd166 0%, #fb8500 100%);
    color: #000;
}

.btn-block {
    width: 100%;
    justify-content: center;
}

.btn-xs {
    min-width: 80px;
    white-space: nowrap;
}

.btn-sm {
    font-size: 11px;
    padding: 4px 8px;
    width: 80px;
    height: 50px;
    white-space: nowrap;
    flex-shrink: 0;
}

.alert {
    padding: 15px 20px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.alert-error {
    background: #fee;
    color: #c00;
    border: 1px solid #fcc;
}

.alert-success {
    background: #efe;
    color: #060;
    border: 1px solid #cfc;
}

.admin-header {
    background: #333333;
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 20px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.admin-header h1 {
    font-size: 24px;
    color: #e8d9a8;
}

.nav-tabs {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.nav-tab {
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    color: #c5c5c5;
    text-decoration: none;
    transition: all 0.3s;
}

.nav-tab:hover,
.nav-tab.active {
    background: linear-gradient(135deg, #d4af37 0%, #b8941f 100%);
    color: white;
}

.card {
    background: #333333;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(212, 175, 55, 0.15);
}

.card-title {
    font-size: 18px;
    color: #e8d9a8;
    font-weight: 600;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: #333333;
    padding: 25px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.stat-number {
    font-size: 36px;
    font-weight: 700;
    background: linear-gradient(135deg, #d4af37 0%, #b8941f 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    color: #b8a878;
    margin-top: 5px;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid rgba(212, 175, 55, 0.15);
}

th {
    background: rgba(255, 255, 255, 0.04);
    font-weight: 600;
    color: #e8d9a8;
}

tr:hover {
    background: rgba(255, 255, 255, 0.04);
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: #333333;
    padding: 30px;
    border-radius: 20px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.modal-close {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #999;
}

.upload-zone {
    border: 3px dashed rgba(212, 175, 55, 0.3);
    border-radius: 15px;
    padding: 50px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
}

.upload-zone:hover,
.upload-zone.dragover {
    border-color: #d4af37;
    background: rgba(212, 175, 55, 0.08);
}

.upload-icon {
    font-size: 64px;
    color: #d4af37;
    margin-bottom: 15px;
}

.file-list {
    margin-top: 20px;
}

.file-item {
    display: flex;
    align-items: center;
    padding: 15px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 10px;
    margin-bottom: 10px;
}

.file-thumb {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
    margin-right: 15px;
}

.file-info {
    flex: 1;
}

.file-name {
    font-weight: 500;
    color: #e8d9a8;
}

.file-size {
    color: #999;
    font-size: 14px;
}

.progress-bar {
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    margin-top: 10px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(135deg, #d4af37 0%, #b8941f 100%);
    width: 0;
    transition: width 0.3s;
}

.view-toggle {
    display: flex;
    gap: 8px;
}

.view-btn {
    padding: 4px 10px;
    border: 1px solid rgba(212, 175, 55, 0.4);
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.08);
    color: #e8d9a8;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.view-btn:hover {
    background: rgba(255, 255, 255, 0.14);
    color: #000;
}

.view-btn.active {
    background: #d4af37;
    color: white;
}

.folder-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
}



.folder-item {
    background: #333333;
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.folder-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
}

.folder-icon {
    font-size: 48px;
    margin-bottom: 10px;
}

.folder-name {
    font-weight: 500;
    color: #e8d9a8;
}

.folder-count {
    color: #999;
    font-size: 14px;
    margin-top: 5px;
}

.gallery-grid,
.image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
}

.image-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(212, 175, 55, 0.12);
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 3px 10px rgba(0,0,0,0.3);
    display: flex;
    flex-direction: column;
    width: 100%;
}

.image-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.5);
    border-color: rgba(212, 175, 55, 0.3);
}

.image-card {
    display: flex;
    flex-direction: column;
    height: 220px;
}

.image-card img {
    width: 100%;
    flex: 1;
    object-fit: contain;
    background: transparent;
    min-height: 0;
}

.image-card .image-blur-container {
    width: 100% !important;
    height: 100% !important;
    flex: 1 !important;
    background-size: cover !important;
    background-position: center center !important;
    background-repeat: no-repeat !important;
    background-color: transparent !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
}

.image-card-img-container {
    aspect-ratio: 1 / 1 !important;
    width: 100% !important;
    max-width: 100%;
    position: relative !important;
    overflow: hidden !important;
    background: transparent;
}

.image-card-body {
    padding: 4px 8px;
    display: flex;
    flex-direction: row;
    align-items: center;
    width: 100%;
    height: 30px;
    box-sizing: border-box;
    gap: 8px;
    margin-top: auto;
    overflow: hidden;
}

.checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;
    min-width: 0;
}

.image-card-title {
    font-weight: 600;
    color: #f0e6c8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 13px;
    flex: 1;
    min-width: 0;
}

.image-card-size {
    font-size: 12px;
    color: #b8a878;
    white-space: nowrap;
    flex-shrink: 0;
    min-width: 60px;
    text-align: right;
}

.image-card-actions {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}

#galleryGrid .image-card .image-card-body .checkbox-wrapper {
    text-align: left;
    width: 70px;
}

#galleryGrid .image-card .image-card-size {
    text-align: center;
    width: 30px;
    font-size: 10px;
    font-weight: 100;
}

#galleryGrid .image-card .image-card-body .checkbox-wrapper .image-card-title {
    width: auto;
}

#galleryGrid .image-card .image-card-body .btn {
    width: 40px;
    border-radius: 5px;
}

#galleryGrid .image-card {
    display: grid;
}

#galleryGrid .image-card .image-card-body .checkbox-wrapper {
    display: block;
}

.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.badge-success {
    background: #d4edda;
    color: #155724;
}

.badge-danger {
    background: #f8d7da;
    color: #721c24;
}

.badge-warning {
    background: #fff3cd;
    color: #856404;
}

.share-link-box {
    background: rgba(255, 255, 255, 0.04);
    padding: 15px;
    border-radius: 10px;
    word-break: break-all;
    font-family: monospace;
    margin: 10px 0;
}

.action-buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.action-buttons span, .action-buttons button {
    justify-content: center;
    font-size: 12px;
    padding: 6px 10px;
}

.action-buttons span span, .action-buttons button span {
    font-size: 10px;
}

.log-table {
    max-height: 400px;
    overflow-y: auto;
}

.log-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid rgba(212, 175, 55, 0.15);
}

.log-time {
    color: #999;
    font-size: 14px;
}

.log-ip {
    font-family: monospace;
}

.log-location {
    color: #b8a878;
    font-size: 14px;
    margin-top: 2px;
}

.settings-section {
    margin-bottom: 30px;
}

@media (max-width: 768px) {
    .btn-sm {
        font-size: 10px;
        padding: 4px 6px;
        width: auto;
        min-width: 60px;
        height: 32px;
    }
    
    .admin-header {
        flex-direction: column;
        text-align: center;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .image-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 4px;
        padding: 4px;
    }
    
    .folder-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    #galleryGrid .image-card {
        width: calc((100vw - 20px) / 2);
        max-width: 150px;
        height: auto;
        aspect-ratio: 1;
        padding: 4px;
    }
    
    #galleryGrid .image-card img {
        max-width: 100%;
        max-height: calc(100% - 35px);
        object-fit: contain;
    }
    
    #galleryGrid .image-card .image-card-body {
        height: 30px;
        padding: 2px 4px;
        gap: 4px;
    }
    
    #galleryGrid .image-card .image-card-body .btn {
        width: 35px;
        padding: 2px 4px;
        font-size: 11px;
    }
    
    #galleryGrid .image-card .image-card-size {
        font-size: 9px;
        min-width: 50px;
    }
    
    #galleryGrid .image-card .image-card-title {
        font-size: 10px;
    }
}
