/* ===== Reset & Base ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

/* ===== Header ===== */
.header {
    text-align: center;
    color: white;
    margin-bottom: 30px;
    animation: fadeInDown 0.6s ease;
}

.header .logo h1 {
    font-size: 3em;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.header .tagline {
    font-size: 1.2em;
    opacity: 0.95;
    font-weight: 300;
}

/* ===== Ad Containers ===== */
.ad-container {
    margin: 20px auto;
    text-align: center;
    min-height: 90px;
}

.ad-top {
    margin-bottom: 30px;
}

.ad-side {
    margin: 30px auto;
}

.ad-bottom {
    margin: 30px 0;
}

.ad-placeholder {
    background: rgba(255, 255, 255, 0.1);
    border: 2px dashed rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    padding: 20px;
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 90px;
}

.ad-placeholder-rect {
    min-height: 250px;
}

.ad-placeholder p {
    margin: 0;
    font-size: 1.1em;
    font-weight: 500;
}

.ad-placeholder small {
    opacity: 0.7;
    margin-top: 5px;
}

/* ===== Main Upload Section ===== */
.upload-section {
    animation: fadeInUp 0.6s ease;
}

.upload-box {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    margin-bottom: 30px;
    transition: transform 0.3s ease;
}

.upload-box:hover {
    transform: translateY(-5px);
}

/* ===== File Input ===== */
.file-input-wrapper {
    margin-bottom: 25px;
}

input[type="file"] {
    display: none;
}

.file-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 50px 30px;
    border: 3px dashed #667eea;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, #f8f9ff 0%, #eef0ff 100%);
    position: relative;
    overflow: hidden;
}

.file-label::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.6), transparent);
    transition: left 0.5s;
}

.file-label:hover::before {
    left: 100%;
}

.file-label:hover {
    background: linear-gradient(135deg, #eef0ff 0%, #e0e7ff 100%);
    border-color: #764ba2;
    transform: scale(1.02);
}

.file-label .icon {
    font-size: 4em;
    margin-bottom: 15px;
    animation: bounce 2s infinite;
}

.file-label .text {
    font-size: 1.2em;
    color: #667eea;
    font-weight: 600;
    margin-bottom: 8px;
}

.file-label .hint {
    font-size: 0.9em;
    color: #666;
    opacity: 0.7;
}

/* ===== Button Upload ===== */
.btn-upload {
    width: 100%;
    padding: 18px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.2em;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-upload:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.btn-upload:active {
    transform: translateY(-1px);
}

.btn-upload:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-icon {
    font-size: 1.3em;
}

/* ===== Progress Bar ===== */
.progress-bar {
    margin-top: 25px;
    height: 40px;
    background: #f0f0f0;
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    width: 0%;
    transition: width 0.3s ease;
    position: relative;
    overflow: hidden;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    animation: shimmer 1.5s infinite;
}

.progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-weight: 700;
    color: #333;
    font-size: 1.1em;
}

/* ===== Result Box ===== */
.result-box {
    margin-top: 25px;
    padding: 25px;
    background: linear-gradient(135deg, #d4f8e8 0%, #c7f5e0 100%);
    border: 2px solid #10b981;
    border-radius: 15px;
    animation: slideIn 0.5s ease;
}

.result-box h3 {
    color: #059669;
    margin-bottom: 20px;
    font-size: 1.5em;
}

.file-info {
    margin-bottom: 20px;
    background: white;
    padding: 15px;
    border-radius: 10px;
}

.file-info p {
    margin: 10px 0;
    color: #333;
    font-size: 1em;
}

.file-info strong {
    color: #667eea;
}

/* ===== Link Section ===== */
.link-section {
    margin-bottom: 25px;
}

.link-group {
    margin-bottom: 15px;
}

.link-group label {
    display: block;
    margin-bottom: 8px;
    color: #059669;
    font-weight: 600;
    font-size: 1em;
}

.download-link {
    display: flex;
    gap: 10px;
}

.download-link input {
    flex: 1;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 0.95em;
    font-family: monospace;
    background: white;
}

.btn-copy {
    padding: 12px 25px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    white-space: nowrap;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-copy:hover {
    background: #5568d3;
    transform: scale(1.05);
}

/* ===== QR Code Section ===== */
.qrcode-section {
    margin: 25px 0;
    padding: 20px;
    background: white;
    border-radius: 12px;
    text-align: center;
    border: 2px solid #10b981;
}

.qrcode-section h4 {
    color: #059669;
    margin-bottom: 15px;
    font-size: 1.2em;
}

#qrcode {
    display: inline-block;
    padding: 15px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

#qrcode img {
    display: block;
    margin: 0 auto;
}

.qr-info {
    margin-top: 12px;
    color: #666;
    font-size: 0.9em;
    font-style: italic;
}

.btn-new {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.05em;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-new:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

/* ===== Error Box ===== */
.error-box {
    margin-top: 25px;
    padding: 20px;
    background: linear-gradient(135deg, #fee 0%, #fdd 100%);
    border: 2px solid #f44;
    border-radius: 15px;
    color: #c00;
    font-weight: 500;
    animation: shake 0.5s ease;
}

/* ===== Features Section ===== */
.features-section {
    margin: 40px 0;
    animation: fadeInUp 0.8s ease;
}

.features-section h2 {
    text-align: center;
    color: white;
    font-size: 2em;
    margin-bottom: 30px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.feature-card {
    background: white;
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.2);
}

.feature-icon {
    font-size: 3em;
    margin-bottom: 15px;
}

.feature-card h3 {
    color: #667eea;
    margin-bottom: 10px;
    font-size: 1.3em;
}

.feature-card p {
    color: #666;
    line-height: 1.6;
}

/* ===== Info Section ===== */
.info-section {
    animation: fadeInUp 1s ease;
}

.info-box {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    margin-bottom: 20px;
}

.info-box h3 {
    color: #667eea;
    margin-bottom: 20px;
    font-size: 1.5em;
}

.info-box ul {
    list-style: none;
}

.info-box ul li {
    padding: 12px 0;
    color: #555;
    padding-left: 30px;
    position: relative;
    font-size: 1.05em;
}

.info-box ul li:before {
    position: absolute;
    left: 0;
    font-weight: bold;
}

/* ===== FAQ Box ===== */
.faq-box details {
    margin: 15px 0;
    padding: 15px;
    background: #f8f9ff;
    border-radius: 10px;
    border-left: 4px solid #667eea;
    cursor: pointer;
    transition: all 0.3s ease;
}

.faq-box details:hover {
    background: #eef0ff;
}

.faq-box summary {
    font-weight: 600;
    color: #667eea;
    cursor: pointer;
    user-select: none;
}

.faq-box details p {
    margin-top: 10px;
    color: #666;
    line-height: 1.6;
}

/* ===== Footer ===== */
.footer {
    margin-top: 50px;
    padding: 30px 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    text-align: center;
    color: white;
    animation: fadeIn 1.2s ease;
}

.footer-content p {
    margin: 5px 0;
    opacity: 0.9;
}

.footer-links {
    margin-top: 15px;
}

.footer-links a {
    color: white;
    text-decoration: none;
    margin: 0 15px;
    opacity: 0.8;
    transition: opacity 0.3s;
}

.footer-links a:hover {
    opacity: 1;
    text-decoration: underline;
}

/* ===== Animations ===== */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .header .logo h1 {
        font-size: 2em;
    }
    
    .header .tagline {
        font-size: 1em;
    }
    
    .upload-box {
        padding: 25px;
    }
    
    .file-label {
        padding: 40px 20px;
    }
    
    .download-link {
        flex-direction: column;
    }
    
    #qrcode {
        padding: 10px;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .feature-card {
        padding: 20px;
    }
    
    .footer-links a {
        display: block;
        margin: 10px 0;
    }
}

@media (max-width: 480px) {
    body {
        padding: 10px;
    }
    
    .header .logo h1 {
        font-size: 1.8em;
    }
    
    .upload-box {
        padding: 20px;
    }
    
    .file-label .icon {
        font-size: 3em;
    }
    
    .btn-upload {
        padding: 15px;
        font-size: 1em;
    }
}