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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: #f0f2f5;
    color: #333;
    min-height: 100vh;
}

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

.header {
    text-align: center;
    padding: 40px 0 20px;
}

.header h1 {
    font-size: 22px;
    font-weight: 600;
    color: #1a1a2e;
}

.header p {
    font-size: 13px;
    color: #888;
    margin-top: 4px;
}

.card {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.card h2 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 16px;
    color: #1a1a2e;
}

.form-group {
    margin-bottom: 14px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 4px;
    color: #555;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #d9d9d9;
    border-radius: 6px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus {
    border-color: #4a6cf7;
    box-shadow: 0 0 0 2px rgba(74,108,247,0.12);
}

.form-row {
    display: flex;
    gap: 12px;
}

.form-row .form-group {
    flex: 1;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.btn-primary {
    background: #4a6cf7;
    color: #fff;
}

.btn-primary:hover {
    background: #3b5de7;
}

.btn-danger {
    background: #e74c3c;
    color: #fff;
}

.btn-danger:hover {
    background: #c0392b;
}

.btn-success {
    background: #27ae60;
    color: #fff;
}

.btn-success:hover {
    background: #219a52;
}

.btn-outline {
    background: transparent;
    border: 1px solid #d9d9d9;
    color: #555;
}

.btn-outline:hover {
    border-color: #4a6cf7;
    color: #4a6cf7;
}

.btn-sm {
    padding: 6px 14px;
    font-size: 13px;
}

.btn-block {
    width: 100%;
}

.file-input-wrapper {
    position: relative;
}

.file-input-wrapper input[type="file"] {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
    top: 0;
    left: 0;
}

.file-drop-zone {
    border: 2px dashed #d9d9d9;
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    transition: all 0.2s;
    cursor: pointer;
}

.file-drop-zone:hover {
    border-color: #4a6cf7;
    background: #f8f9ff;
}

.file-drop-zone .icon {
    font-size: 32px;
    margin-bottom: 8px;
}

.file-drop-zone .text {
    font-size: 14px;
    color: #555;
}

.file-drop-zone .hint {
    font-size: 12px;
    color: #aaa;
    margin-top: 4px;
}

.file-selected {
    border-color: #27ae60;
    background: #f0faf4;
}

.file-selected .file-name {
    font-size: 14px;
    font-weight: 500;
    color: #27ae60;
}

.file-selected .file-size {
    font-size: 12px;
    color: #888;
    margin-top: 2px;
}

.upload-progress {
    display: none;
    margin-top: 12px;
}

.upload-progress.active {
    display: block;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: #e8e8e8;
    border-radius: 3px;
    overflow: hidden;
}

.progress-bar .fill {
    height: 100%;
    background: #4a6cf7;
    border-radius: 3px;
    transition: width 0.3s;
    width: 0%;
}

.result-box {
    display: none;
    margin-top: 16px;
    padding: 16px;
    background: #f0faf4;
    border: 1px solid #d4edda;
    border-radius: 8px;
}

.result-box.active {
    display: block;
}

.result-box .label {
    font-size: 12px;
    color: #888;
}

.result-box .link {
    font-size: 14px;
    font-weight: 500;
    color: #4a6cf7;
    word-break: break-all;
    margin: 4px 0;
}

.result-box .info {
    font-size: 12px;
    color: #888;
}

.copy-btn {
    cursor: pointer;
    color: #4a6cf7;
    margin-left: 6px;
    font-size: 12px;
}

.error-box {
    display: none;
    margin-top: 12px;
    padding: 12px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    color: #dc2626;
    font-size: 13px;
}

.error-box.active {
    display: block;
}

.alert-box {
    display: none;
    padding: 14px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 12px;
}

.alert-box.active {
    display: block;
}

.alert-warning {
    background: #fffbeb;
    border: 1px solid #fde68a;
    color: #92400e;
}

.alert-info {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1e40af;
}

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

.space-info .label {
    font-size: 13px;
    color: #888;
}

.space-info .value {
    font-size: 13px;
    font-weight: 500;
}

.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.4);
    z-index: 100;
    align-items: center;
    justify-content: center;
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.modal h3 {
    font-size: 16px;
    margin-bottom: 12px;
}

.modal p {
    font-size: 14px;
    color: #555;
    margin-bottom: 16px;
    line-height: 1.6;
}

.modal .btn-row {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.password-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #f0f2f5;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
}

.password-overlay.hidden {
    display: none;
}

.password-card {
    background: #fff;
    border-radius: 12px;
    padding: 32px;
    max-width: 380px;
    width: 90%;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    text-align: center;
}

.password-card h2 {
    margin-bottom: 8px;
    font-size: 18px;
}

.password-card p {
    font-size: 13px;
    color: #888;
    margin-bottom: 20px;
}

.password-card .form-group {
    text-align: left;
}

.password-card .error {
    color: #dc2626;
    font-size: 12px;
    margin-top: 8px;
    display: none;
}

/* Share page */
.file-preview {
    text-align: center;
}

.file-preview img {
    max-width: 100%;
    max-height: 500px;
    border-radius: 8px;
}

.file-preview video,
.file-preview audio {
    max-width: 100%;
    border-radius: 8px;
}

.file-info-list {
    margin: 12px 0;
}

.file-info-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 13px;
}

.file-info-item:last-child {
    border-bottom: none;
}

.file-info-item .label {
    color: #888;
}

.file-info-item .value {
    font-weight: 500;
}

.download-section {
    text-align: center;
    margin-top: 16px;
}

.share-pwd-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.4);
    z-index: 100;
    align-items: center;
    justify-content: center;
}

.share-pwd-overlay.active {
    display: flex;
}

/* Admin */
.admin-layout {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 0;
    border-bottom: 1px solid #f0f0f0;
}

.setting-item:last-child {
    border-bottom: none;
}

.setting-item .info .title {
    font-size: 14px;
    font-weight: 500;
}

.setting-item .info .desc {
    font-size: 12px;
    color: #888;
    margin-top: 2px;
}

.status-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin: 16px 0;
}

.status-item {
    text-align: center;
    padding: 16px;
    background: #f8f9fa;
    border-radius: 8px;
}

.status-item .num {
    font-size: 24px;
    font-weight: 700;
    color: #4a6cf7;
}

.status-item .label {
    font-size: 12px;
    color: #888;
    margin-top: 4px;
}

@media (max-width: 500px) {
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    .status-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
