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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

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

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

.security-notice {
    margin-top: 20px;
    padding: 15px 20px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    backdrop-filter: blur(10px);
    font-size: 0.95rem;
    line-height: 1.6;
}

.security-notice p {
    margin: 8px 0;
}

.security-notice a {
    color: #fff;
    text-decoration: underline;
    font-weight: 500;
}

.security-notice a:hover {
    opacity: 0.8;
}

main {
    flex: 1;
}

.upload-section, .retrieve-section {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.tabs {
    display: flex;
    margin-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
}

.tab-button {
    flex: 1;
    padding: 12px 20px;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.tab-button.active {
    color: #667eea;
}

.tab-button.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: #667eea;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.tab-content h3 {
    margin-bottom: 15px;
    color: #333;
}

#textInput {
    width: 100%;
    min-height: 200px;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    resize: vertical;
    transition: border-color 0.3s ease;
}

#textInput:focus {
    outline: none;
    border-color: #667eea;
}

.file-upload-area {
    border: 2px dashed #ccc;
    border-radius: 8px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.file-upload-area:hover {
    border-color: #667eea;
    background: #f8f9ff;
}

.file-upload-area.dragover {
    border-color: #667eea;
    background: #f0f3ff;
}

#fileInput {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.file-info {
    margin-top: 15px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 6px;
    font-size: 0.9rem;
}

.options {
    margin: 20px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.options label {
    font-weight: 500;
}

.options select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
}

.share-button, .download-button, .download-file-button {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

.share-button:hover, .download-button:hover, .download-file-button:hover {
    transform: translateY(-2px);
}

.share-button:disabled, .download-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.result {
    margin-top: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #28a745;
}

.result h3 {
    color: #28a745;
    margin-bottom: 15px;
}

.link-container {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

#shareLink {
    flex: 1;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-family: monospace;
    font-size: 0.9rem;
}

.copy-button {
    padding: 12px 20px;
    background: #28a745;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
}

.copy-button:hover {
    background: #218838;
}

.warning {
    color: #e74c3c;
    font-weight: 500;
    margin-bottom: 10px;
}

.info {
    color: #666;
    font-size: 0.9rem;
}

.hidden {
    display: none !important;
}

.loader {
    width: 20px;
    height: 20px;
    border: 2px solid #ffffff80;
    border-top: 2px solid #ffffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading {
    text-align: center;
    padding: 40px;
}

.loading .loader {
    width: 40px;
    height: 40px;
    border: 3px solid #eee;
    border-top: 3px solid #667eea;
    margin: 0 auto 20px;
}

.info-section, .content-section, .error-section {
    text-align: center;
}

.content-info {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
    text-align: left;
}

.content-info p {
    margin-bottom: 8px;
}

.text-content textarea {
    width: 100%;
    min-height: 200px;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-family: monospace;
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.error-section {
    color: #e74c3c;
}

.back-link {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
}

.back-link:hover {
    text-decoration: underline;
}

footer {
    text-align: center;
    margin-top: 40px;
    color: rgba(255,255,255,0.8);
    font-size: 0.9rem;
}

footer .back-link {
    color: rgba(255,255,255,0.9);
    margin-top: 10px;
    display: inline-block;
}

@media (max-width: 600px) {
    .container {
        padding: 15px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .upload-section, .retrieve-section {
        padding: 20px;
    }
    
    .link-container {
        flex-direction: column;
    }
}