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

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

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
}

header {
    text-align: center;
    margin-bottom: 3rem;
    color: white;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 800px;
    margin: 0 auto;
}

.admin-link {
    font-size: 1.5rem;
    text-decoration: none;
    opacity: 0.6;
    transition: opacity 0.3s ease;
    padding: 0.5rem;
}

.admin-link:hover {
    opacity: 1;
}

header h1 {
    font-size: 3rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

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

main {
    background: white;
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.upload-section {
    text-align: center;
    margin-bottom: 2rem;
}

.file-input-wrapper {
    position: relative;
    display: inline-block;
    margin-bottom: 1.5rem;
}

#mediaFile {
    opacity: 0;
    position: absolute;
    z-index: -1;
}

.file-input-label {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    background: #f8f9fa;
    border: 2px dashed #dee2e6;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.1rem;
    min-width: 300px;
}

.file-input-label:hover {
    background: #e9ecef;
    border-color: #667eea;
    transform: translateY(-2px);
}

.file-icon {
    font-size: 1.5rem;
}

#uploadBtn {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 250px;
}

#uploadBtn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

#uploadBtn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
    margin-top: 1rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    width: 0%;
    transition: width 0.3s ease;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { transform: translateX(-100%); }
    50% { transform: translateX(100%); }
    100% { transform: translateX(-100%); }
}

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

.results-section h3 {
    color: #28a745;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.error-section h3 {
    color: #dc3545;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.result-item {
    margin-bottom: 1rem;
    text-align: left;
}

.result-item label {
    font-weight: 600;
    display: block;
    margin-bottom: 0.5rem;
    color: #495057;
}

.url-container {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

#shortUrl {
    flex: 1;
    padding: 0.75rem;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    background: #f8f9fa;
    font-size: 1rem;
}

.copy-btn {
    background: #28a745;
    color: white;
    border: none;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.copy-btn:hover {
    background: #218838;
    transform: translateY(-1px);
}

.preview-container {
    margin: 1.5rem 0;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 12px;
}

.preview-container img {
    max-width: 100%;
    max-height: 300px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.preview-container video {
    max-width: 100%;
    max-height: 300px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.reset-btn {
    background: #6c757d;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    margin-top: 1rem;
}

.reset-btn:hover {
    background: #5a6268;
    transform: translateY(-1px);
}

.error-section p {
    color: #dc3545;
    margin-bottom: 1rem;
    padding: 1rem;
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 8px;
}

footer {
    background: rgba(255,255,255,0.1);
    border-radius: 20px;
    padding: 2rem;
    backdrop-filter: blur(10px);
}

.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    text-align: center;
}

.feature {
    color: white;
}

.feature h4 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.feature p {
    opacity: 0.9;
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    main {
        padding: 1.5rem;
    }
    
    .file-input-label {
        min-width: auto;
        width: 100%;
    }
    
    #uploadBtn {
        min-width: auto;
        width: 100%;
    }
    
    .url-container {
        flex-direction: column;
    }
    
    .copy-btn {
        width: 100%;
    }
}