* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: #000;
    color: #fff;
    line-height: 1.6;
    padding: 20px;
}

.container {
    max-width: 960px;
    margin: 0 auto;
}

header {
    text-align: center;
    margin-bottom: 40px;
    padding: 40px 20px;
}

header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    font-weight: 600;
}

.subtitle {
    color: #999;
    font-size: 1em;
}

.upload-box, .history-box {
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
}

.upload-box h2, .history-box h2 {
    font-size: 1.5em;
    margin-bottom: 10px;
}

.description {
    color: #999;
    margin-bottom: 20px;
    font-size: 0.95em;
}

.settings {
    display: flex;
    gap: 30px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.quality-control, .expiry-control {
    flex: 1;
    min-width: 200px;
}

.quality-control label, .expiry-control label {
    display: block;
    margin-bottom: 8px;
    color: #ccc;
}

#quality {
    width: 100%;
    height: 6px;
    background: #333;
    outline: none;
    border-radius: 3px;
}

#quality::-webkit-slider-thumb {
    appearance: none;
    width: 18px;
    height: 18px;
    background: #fff;
    cursor: pointer;
    border-radius: 50%;
}

#expiry {
    width: 100%;
    padding: 10px;
    background: #000;
    color: #fff;
    border: 1px solid #333;
    border-radius: 6px;
    font-size: 1em;
}

.password-input {
    margin-bottom: 20px;
}

#password {
    width: 100%;
    padding: 12px;
    background: #000;
    color: #fff;
    border: 1px solid #333;
    border-radius: 6px;
    font-size: 1em;
}

#password:focus {
    outline: none;
    border-color: #666;
}

.drop-zone {
    border: 2px dashed #444;
    border-radius: 8px;
    padding: 60px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    margin-bottom: 20px;
}

.drop-zone:hover, .drop-zone.drag-over {
    border-color: #fff;
    background: #222;
}

.upload-icon {
    font-size: 3em;
    margin-bottom: 15px;
}

.drop-zone p {
    margin: 5px 0;
}

.file-info {
    color: #666;
    font-size: 0.9em;
}

.upload-btn, .refresh-btn {
    width: 100%;
    padding: 15px;
    background: #fff;
    color: #000;
    border: none;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.upload-btn:hover, .refresh-btn:hover {
    background: #e0e0e0;
}

.upload-btn:disabled {
    background: #333;
    color: #666;
    cursor: not-allowed;
}

.refresh-btn {
    margin-bottom: 20px;
}

.history-auth {
    text-align: center;
    padding: 40px 20px;
}

.history-auth p {
    margin-bottom: 15px;
    color: #999;
}

#historyPassword {
    width: 100%;
    max-width: 400px;
    padding: 12px;
    background: #000;
    color: #fff;
    border: 1px solid #333;
    border-radius: 6px;
    font-size: 1em;
    margin-bottom: 15px;
}

#historyPassword:focus {
    outline: none;
    border-color: #666;
}

.view-history-btn {
    padding: 12px 30px;
    background: #fff;
    color: #000;
    border: none;
    border-radius: 6px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.view-history-btn:hover {
    background: #e0e0e0;
}

.view-history-btn:disabled {
    background: #333;
    color: #666;
    cursor: not-allowed;
}

.history-content {
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.btn-icon {
    font-size: 1.2em;
}

.result {
    margin-top: 20px;
}

.result-item {
    background: #000;
    border: 1px solid #333;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 10px;
}

.result-item.success {
    border-color: #4caf50;
}

.result-item.error {
    border-color: #f44336;
}

.result-item img {
    max-width: 200px;
    max-height: 200px;
    border-radius: 4px;
    margin: 10px 0;
}

.result-item input {
    width: 100%;
    padding: 8px;
    background: #1a1a1a;
    color: #fff;
    border: 1px solid #333;
    border-radius: 4px;
    margin: 5px 0;
    font-size: 0.9em;
}

.copy-btn, .delete-btn {
    padding: 8px 15px;
    background: #333;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    margin-top: 5px;
    margin-right: 5px;
}

.copy-btn:hover {
    background: #444;
}

.delete-btn {
    background: #d32f2f;
}

.delete-btn:hover {
    background: #b71c1c;
}

.history-actions {
    margin-top: 8px;
}

.history-list {
    max-height: 500px;
    overflow-y: auto;
}

.history-item {
    background: #000;
    border: 1px solid #333;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 10px;
    display: flex;
    gap: 15px;
    align-items: center;
}

.history-item img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
}

.history-info {
    flex: 1;
}

.history-info p {
    margin: 5px 0;
    font-size: 0.9em;
}

.history-link {
    color: #fff;
    text-decoration: none;
    word-break: break-all;
}

.history-link:hover {
    text-decoration: underline;
}

.expired {
    color: #f44336;
}

footer {
    text-align: center;
    color: #666;
    padding: 20px;
    font-size: 0.9em;
}

footer p {
    margin: 5px 0;
}

@media (max-width: 768px) {
    .settings {
        flex-direction: column;
    }
    
    .history-item {
        flex-direction: column;
        text-align: center;
    }
}
