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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #2a9d94 0%, #228b7f 100%);
    min-height: 100vh;
    padding: 20px;
}

/* Authentication Modal */
.auth-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999999;
    overflow: auto;
}

.auth-modal-content {
    background: white;
    padding: 40px;
    border-radius: 15px;
    max-width: 450px;
    width: 90%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 1000000;
    margin: 20px;
}

.auth-modal-content h2 {
    color: #333;
    margin-bottom: 20px;
    text-align: center;
}

.auth-modal-content p {
    color: #666;
    margin-bottom: 20px;
    text-align: center;
}

.token-input {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 20px;
    font-family: monospace;
}

.token-input:focus {
    outline: none;
    border-color: #2a9d94;
}

.auth-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.auth-buttons button {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
}

.auth-buttons .btn-primary {
    background: linear-gradient(135deg, #2a9d94 0%, #228b7f 100%);
    color: white;
}

.auth-buttons .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(42, 157, 148, 0.4);
}

.auth-buttons .btn-secondary {
    background: #f0f0f0;
    color: #666;
}

.auth-buttons .btn-secondary:hover {
    background: #e0e0e0;
}

.auth-note {
    font-size: 12px;
    color: #999;
    text-align: center;
    margin-top: 20px;
}

.token-format-help {
    margin-bottom: 15px;
    text-align: center;
}

.token-format-help small {
    color: #666;
    font-size: 12px;
}

.token-format-help code {
    background: #f0f0f0;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: monospace;
    font-size: 11px;
}

.token-error {
    background: #ffebee;
    color: #c62828;
    padding: 10px;
    border-radius: 5px;
    margin-top: 10px;
    font-size: 14px;
    text-align: center;
}

.auth-help {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    text-align: center;
}

.auth-help h4 {
    color: #333;
    margin-bottom: 10px;
    font-size: 16px;
}

.auth-help p {
    color: #666;
    font-size: 13px;
    margin-bottom: 8px;
    line-height: 1.4;
}

/* User Info Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 15px 30px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    z-index: 1000;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 20px;
    font-size: 14px;
    color: #666;
}

.user-info strong {
    color: #333;
}

.btn-logout {
    padding: 6px 16px;
    background: #f44336;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 13px;
    transition: background 0.3s;
}

.btn-logout:hover {
    background: #d32f2f;
}

/* Adjust container for header */
body.has-header {
    padding-top: 80px;
}

/* Prevent body scroll when modal is active */
body.modal-active {
    overflow: hidden;
    position: fixed;
    width: 100%;
    height: 100%;
}

/* Upload meta info */
.upload-meta {
    font-size: 12px;
    color: #999;
    margin-top: 5px;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    padding: 40px;
}

header {
    text-align: center;
    margin-bottom: 40px;
}

header h1 {
    font-size: 2.5em;
    color: #333;
    margin-bottom: 10px;
    background: linear-gradient(135deg, #2a9d94 0%, #228b7f 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

header p {
    color: #666;
    font-size: 1.1em;
}

.upload-section {
    margin-bottom: 40px;
}

.drop-zone {
    border: 3px dashed #ddd;
    border-radius: 15px;
    padding: 60px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #fafafa;
}

.drop-zone:hover {
    border-color: #2a9d94;
    background: #f0fffe;
}

.drop-zone.dragover {
    border-color: #1f7a70;
    background: #e8fdfc;
    transform: scale(1.02);
}

.upload-icon {
    color: #2a9d94;
    margin-bottom: 20px;
}

.drop-text {
    font-size: 1.2em;
    color: #333;
    margin-bottom: 10px;
}

.file-types {
    color: #999;
    font-size: 0.9em;
}

.file-preview {
    margin-top: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
}

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

.preview-header h3 {
    color: #333;
}

.btn-text {
    background: none;
    border: none;
    color: #1f7a70;
    cursor: pointer;
    font-size: 0.9em;
    text-decoration: underline;
}

.btn-text:hover {
    color: #0f5a54;
}

.file-list {
    display: grid;
    gap: 10px;
    margin-bottom: 20px;
}

.file-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.file-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.file-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e8fdfc;
    border-radius: 8px;
    font-size: 1.2em;
}

.file-details h4 {
    color: #333;
    font-size: 0.95em;
    margin-bottom: 2px;
}

.file-details p {
    color: #999;
    font-size: 0.85em;
}

.btn-remove {
    background: none;
    border: none;
    color: #ff4757;
    cursor: pointer;
    font-size: 1.2em;
    padding: 5px;
}

.btn-remove:hover {
    color: #ff3838;
}

.btn-primary {
    background: linear-gradient(135deg, #2a9d94 0%, #1f7a70 100%);
    color: white;
    border: none;
    padding: 15px 40px;
    border-radius: 50px;
    font-size: 1.1em;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: block;
    margin: 0 auto;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(42, 157, 148, 0.4);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.upload-progress {
    margin: 30px 0;
    padding: 30px;
    background: #f8f9fa;
    border-radius: 10px;
}

.upload-progress h3 {
    color: #333;
    margin-bottom: 20px;
}

.progress-bar {
    height: 30px;
    background: #e9ecef;
    border-radius: 15px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(135deg, #2a9d94 0%, #1f7a70 100%);
    border-radius: 15px;
    transition: width 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.progress-text {
    text-align: center;
    color: #666;
    font-size: 1.1em;
}

.uploaded-files {
    margin-top: 40px;
}

.uploaded-files h2 {
    color: #333;
    margin-bottom: 20px;
    font-size: 1.8em;
}

.uploaded-list {
    display: grid;
    gap: 15px;
}

.uploaded-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
    border: 1px solid #e9ecef;
}

.uploaded-info {
    flex: 1;
}

.uploaded-info h4 {
    color: #333;
    margin-bottom: 10px;
}

.share-url {
    display: flex;
    gap: 10px;
    align-items: center;
}

.url-input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-family: monospace;
    font-size: 0.9em;
    background: white;
}

.btn-copy {
    background: #2a9d94;
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.3s ease;
    white-space: nowrap;
}

.btn-copy:hover {
    background: #1f7a70;
}

.btn-copy.copied {
    background: #2ecc71;
}

.empty-state {
    text-align: center;
    color: #999;
    padding: 40px;
    font-size: 1.1em;
}

.hidden {
    display: none;
}

.toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #333;
    color: white;
    padding: 15px 25px;
    border-radius: 50px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 1000;
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

.toast.success {
    background: #2ecc71;
}

.toast.error {
    background: #ff4757;
}

@media (max-width: 768px) {
    .container {
        padding: 20px;
    }
    
    header h1 {
        font-size: 2em;
    }
    
    .drop-zone {
        padding: 40px 15px;
    }
    
    .btn-primary {
        width: 100%;
    }
    
    .share-url {
        flex-direction: column;
    }
    
    .url-input,
    .btn-copy {
        width: 100%;
    }
}