* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #000000;
    background-image: 
        radial-gradient(at 0% 0%, rgba(120, 119, 198, 0.1) 0px, transparent 50%),
        radial-gradient(at 100% 0%, rgba(255, 255, 255, 0.05) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(120, 119, 198, 0.1) 0px, transparent 50%),
        radial-gradient(at 0% 100%, rgba(255, 255, 255, 0.05) 0px, transparent 50%);
    min-height: 100vh;
    padding: 20px;
    color: #ffffff;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: rgba(30, 30, 30, 0.4);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    overflow: hidden;
}

header {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: #ffffff;
    padding: 40px;
    text-align: center;
}

header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    font-weight: 600;
    letter-spacing: -0.5px;
}

header p {
    font-size: 1.1em;
    opacity: 0.7;
    font-weight: 400;
}

.message {
    margin: 20px;
    padding: 15px 20px;
    border-radius: 12px;
    font-weight: 500;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.message.success {
    background: rgba(52, 211, 153, 0.15);
    color: #34d399;
    border-color: rgba(52, 211, 153, 0.3);
}

.message.error {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.3);
}

section {
    padding: 30px 40px;
}

section h2 {
    font-size: 1.8em;
    margin-bottom: 20px;
    color: #ffffff;
    font-weight: 600;
    letter-spacing: -0.3px;
}

.upload-section {
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.upload-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.file-input-wrapper {
    position: relative;
}

.file-input-wrapper input[type="file"] {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
    z-index: 2;
}

.file-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 30px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 2px dashed rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.file-label:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.file-text {
    font-size: 1.1em;
    color: #ffffff;
    font-weight: 500;
    opacity: 0.9;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9em;
}

.custom-name-input {
    padding: 12px 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    font-size: 1em;
    background: rgba(0, 0, 0, 0.3);
    color: #ffffff;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    width: 100%;
}

.custom-name-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.custom-name-input:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.3);
    background: rgba(0, 0, 0, 0.4);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.05);
}

.form-hint {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.85em;
    margin-top: -4px;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 12px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.btn-primary {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-primary:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.btn-copy {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.3);
    padding: 8px 16px;
    font-size: 0.9em;
}

.btn-copy:hover {
    background: rgba(59, 130, 246, 0.3);
    border-color: rgba(59, 130, 246, 0.4);
}

.btn-download {
    background: rgba(34, 197, 94, 0.2);
    color: #4ade80;
    border: 1px solid rgba(34, 197, 94, 0.3);
    padding: 8px 16px;
    font-size: 0.9em;
}

.btn-download:hover {
    background: rgba(34, 197, 94, 0.3);
    border-color: rgba(34, 197, 94, 0.4);
}

.btn-view {
    background: rgba(168, 85, 247, 0.2);
    color: #a78bfa;
    border: 1px solid rgba(168, 85, 247, 0.3);
    padding: 8px 16px;
    font-size: 0.9em;
    width: 100%;
    margin-bottom: 10px;
}

.btn-view:hover {
    background: rgba(168, 85, 247, 0.3);
    border-color: rgba(168, 85, 247, 0.4);
}

.btn-delete {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
    padding: 8px 16px;
    font-size: 0.9em;
    width: 100%;
    margin-top: 10px;
    cursor: pointer;
}

.btn-delete:hover {
    background: rgba(239, 68, 68, 0.3);
    border-color: rgba(239, 68, 68, 0.4);
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 1.2em;
}

.files-count {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9em;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.filters-container {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-bottom: 20px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
    min-width: 180px;
}

.filter-group label {
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.85em;
}

.filter-select {
    padding: 10px 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    font-size: 0.95em;
    background: rgba(0, 0, 0, 0.3);
    color: #ffffff;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    cursor: pointer;
}

.filter-select:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.3);
    background: rgba(0, 0, 0, 0.4);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.05);
}

.filter-select option {
    background: #1a1a1a;
    color: #ffffff;
}

.btn-filter-clear {
    align-self: flex-end;
    padding: 10px 20px;
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
    font-size: 0.9em;
    height: fit-content;
}

.btn-filter-clear:hover {
    background: rgba(239, 68, 68, 0.3);
    border-color: rgba(239, 68, 68, 0.4);
}

.empty-state-filtered {
    text-align: center;
    padding: 60px 20px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 1.1em;
    grid-column: 1 / -1;
}

.files-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.file-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 20px;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.file-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
}

.file-icon-large {
    font-size: 3em;
    text-align: center;
    opacity: 0.6;
    padding: 20px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.file-preview {
    width: 100%;
    height: 200px;
    overflow: hidden;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.preview-link {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.preview-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 12px;
    transition: transform 0.3s ease;
    cursor: pointer;
}

.preview-link:hover .preview-image {
    transform: scale(1.05);
}

.preview-link:hover {
    background: rgba(255, 255, 255, 0.05);
}

.file-info {
    flex: 1;
}

.file-name {
    font-size: 1.1em;
    margin-bottom: 8px;
    color: #ffffff;
    word-break: break-word;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    font-weight: 500;
}

.file-type {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85em;
    margin-bottom: 5px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.file-size {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9em;
    margin-bottom: 5px;
}

.file-date {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.85em;
}

.file-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.link-container {
    display: flex;
    gap: 5px;
}

.link-input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    font-size: 0.85em;
    background: rgba(0, 0, 0, 0.3);
    color: rgba(255, 255, 255, 0.8);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.link-input:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.3);
    background: rgba(0, 0, 0, 0.4);
}

@media (max-width: 768px) {
    header h1 {
        font-size: 2em;
    }
    
    section {
        padding: 20px;
    }
    
    .files-grid {
        grid-template-columns: 1fr;
    }
    
    .link-container {
        flex-direction: column;
    }
    
    .link-input {
        font-size: 0.75em;
    }
}
