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

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

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

/* Header */
.header {
    text-align: center;
    margin-bottom: 40px;
    color: white;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 15px;
}

.logo i {
    font-size: 3rem;
    color: #fff;
}

.logo h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0;
}

.subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
    font-weight: 300;
    margin-bottom: 20px;
}

.header-donate {
    margin-top: 15px;
}

.donate-button-header {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.15);
    color: white;
    text-decoration: none;
    padding: 10px 18px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.donate-button-header:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-1px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Main Content */
.main-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
    flex: 1;
}

/* Builder Card */
.builder-card {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(10px);
}

/* Form Styles */
.form-section {
    margin-bottom: 35px;
}

.form-section h2 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.4rem;
    margin-bottom: 25px;
    color: #2d3748;
    font-weight: 600;
}

.form-section h2 i {
    color: #667eea;
    font-size: 1.2rem;
}

.input-group {
    margin-bottom: 20px;
}

.input-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #374151;
    font-size: 0.95rem;
}

input[type="text"],
input[type="url"],
input[type="number"] {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #f9fafb;
}

input[type="text"]:focus,
input[type="url"]:focus,
input[type="number"]:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.input-help {
    display: block;
    margin-top: 6px;
    font-size: 0.85rem;
    color: #6b7280;
}

/* File Upload */
.file-upload {
    position: relative;
}

.file-upload input[type="file"] {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.file-upload-display {
    border: 2px dashed #d1d5db;
    border-radius: 12px;
    padding: 30px 20px;
    text-align: center;
    transition: all 0.3s ease;
    background: #f9fafb;
    cursor: pointer;
}

.file-upload-display:hover {
    border-color: #667eea;
    background: #f3f4f6;
}

.file-upload-placeholder i {
    font-size: 2rem;
    color: #9ca3af;
    margin-bottom: 10px;
    display: block;
}

.file-upload-placeholder span {
    color: #6b7280;
    font-weight: 500;
}

.file-upload-preview {
    display: flex;
    align-items: center;
    gap: 15px;
    justify-content: center;
}

.file-upload-preview img {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    object-fit: cover;
    border: 2px solid #e5e7eb;
}

.hidden {
    display: none !important;
}

/* Build Button */
.build-button {
    width: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 18px 30px;
    border-radius: 15px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 30px;
}

.build-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.build-button:active {
    transform: translateY(0);
}

.build-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Build Status */
.build-status {
    text-align: center;
    padding: 40px;
}

.status-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #e5e7eb;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Progress Bar */
.progress-container {
    width: 100%;
    max-width: 400px;
    margin: 20px 0;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background-color: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 15px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    border-radius: 4px;
    transition: width 0.3s ease;
    width: 0%;
}

.progress-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
    font-size: 0.9rem;
    color: #6b7280;
}

.progress-info span {
    text-align: center;
}

#estimatedTime {
    font-size: 0.8rem;
    color: #9ca3af;
}

/* Build Result */
.build-result {
    text-align: center;
    padding: 40px;
}

.result-success i {
    font-size: 4rem;
    color: #10b981;
    margin-bottom: 20px;
}

.result-success h3 {
    font-size: 1.8rem;
    margin-bottom: 15px;
    color: #065f46;
}

.result-success p {
    font-size: 1.1rem;
    color: #6b7280;
    margin-bottom: 30px;
}

.download-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #10b981;
    color: white;
    text-decoration: none;
    padding: 15px 30px;
    border-radius: 12px;
    font-weight: 600;
    transition: all 0.3s ease;
    margin-bottom: 30px;
}

.download-button:hover {
    background: #059669;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(16, 185, 129, 0.3);
}

/* Download section with donate */
.download-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 25px;
}

.success-donate {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border: 2px solid #0ea5e9;
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    max-width: 300px;
}

.donate-message {
    font-size: 1.1rem;
    color: #0c4a6e;
    margin-bottom: 8px;
    font-weight: 600;
}

.donate-sub {
    font-size: 0.9rem;
    color: #0369a1;
    margin-bottom: 15px;
    opacity: 0.8;
}

.donate-button-success {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #ff6b6b 0%, #ff8e8e 100%);
    color: white;
    text-decoration: none;
    padding: 12px 20px;
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
}

.donate-button-success:hover {
    background: linear-gradient(135deg, #ff5252 0%, #ff7979 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 107, 107, 0.4);
}

.donate-button-success i {
    color: #ffeb3b;
}

/* Pulse animation for donate section */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.9;
    }
}

/* Floating Ko-fi Widget */
.floating-kofi {
    position: fixed;
    top: 50%;
    right: 30px;
    transform: translateY(-50%);
    z-index: 1000;
    animation: slideInRight 0.5s ease-out;
}

.kofi-content {
    background: linear-gradient(135deg, #ff5722 0%, #ff7043 100%);
    color: white;
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 15px 40px rgba(255, 87, 34, 0.3);
    max-width: 280px;
    position: relative;
    backdrop-filter: blur(10px);
}

.kofi-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.kofi-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.kofi-icon {
    font-size: 2rem;
    color: #ffeb3b;
    margin-bottom: 10px;
    display: block;
    text-align: center;
}

.kofi-message {
    text-align: center;
}

.kofi-message h4 {
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 1.1rem;
}

.kofi-message p {
    margin-bottom: 15px;
    opacity: 0.9;
    font-size: 0.9rem;
    line-height: 1.4;
}

.kofi-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: white;
    color: #ff5722;
    text-decoration: none;
    padding: 10px 18px;
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}

.kofi-button:hover {
    background: #f5f5f5;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.kofi-button i {
    color: #e91e63;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateY(-50%) translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateY(-50%) translateX(0);
    }
}

@keyframes slideOutRight {
    from {
        opacity: 1;
        transform: translateY(-50%) translateX(0);
    }
    to {
        opacity: 0;
        transform: translateY(-50%) translateX(100px);
    }
}

/* Build Instructions */
.build-instructions {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 25px;
    text-align: left;
    margin-top: 30px;
}

.build-instructions h4 {
    margin-bottom: 15px;
    color: #1e293b;
    font-weight: 600;
}

.build-instructions ol {
    padding-left: 20px;
    color: #475569;
}

.build-instructions li {
    margin-bottom: 8px;
    line-height: 1.6;
}

.apk-info {
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 8px;
    padding: 20px;
    margin-top: 20px;
}

.apk-info h5 {
    margin-bottom: 10px;
    color: #0c4a6e;
    font-weight: 600;
}

.apk-info ul {
    list-style: none;
    padding-left: 0;
}

.apk-info li {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
    color: #0369a1;
}

.build-error-info {
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Info Section */
.info-section {
    color: white;
}

.info-cards {
    display: grid;
    gap: 20px;
    margin-bottom: 40px;
}

.info-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    padding: 25px;
    text-align: center;
    transition: all 0.3s ease;
}

.info-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
}

.info-card i {
    font-size: 2.5rem;
    margin-bottom: 15px;
    color: #fbbf24;
}

.info-card h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    font-weight: 600;
}

.info-card p {
    opacity: 0.9;
    line-height: 1.5;
}

/* Features */
.features {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 20px;
}

.features h3 {
    margin-bottom: 20px;
    font-weight: 600;
    font-size: 1.3rem;
}

.features ul {
    list-style: none;
}

.features li {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    opacity: 0.9;
}

.features li i {
    color: #10b981;
    font-size: 0.9rem;
}

/* Queue Status Section */
.queue-status-section {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    padding: 25px;
    border-left: 4px solid #3b82f6;
}

.queue-status-section h3 {
    margin-bottom: 15px;
    font-weight: 600;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.queue-status {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 15px;
}

.queue-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
    opacity: 0.9;
}

.queue-item i {
    color: #3b82f6;
    font-size: 14px;
    width: 16px;
    text-align: center;
}

.queue-help {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.85em;
    line-height: 1.4;
    opacity: 0.8;
}

/* Footer */
.footer {
    margin-top: 40px;
    padding: 30px 20px;
    text-align: center;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.footer-content p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    margin: 0;
}

.donate-button-footer {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    text-decoration: none;
    padding: 12px 20px;
    border-radius: 25px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    font-weight: 500;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.donate-button-footer:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .main-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .logo h1 {
        font-size: 2rem;
    }
    
    .subtitle {
        font-size: 1.1rem;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 15px;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .builder-card {
        padding: 25px;
    }
    
    .input-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .logo {
        flex-direction: column;
        gap: 10px;
    }
    
    .logo h1 {
        font-size: 1.8rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .form-section h2 {
        font-size: 1.2rem;
    }
    
    .download-section {
        gap: 20px;
    }
    
    .success-donate {
        max-width: 100%;
        margin: 0 10px;
    }
    
    .donate-button-header {
        font-size: 0.85rem;
        padding: 8px 15px;
    }
}

@media (max-width: 480px) {
    .builder-card {
        padding: 20px;
    }
    
    .logo i {
        font-size: 2.5rem;
    }
    
    .logo h1 {
        font-size: 1.6rem;
    }
    
    .build-button {
        padding: 16px 24px;
        font-size: 1rem;
    }
    
    .floating-kofi {
        right: 10px;
        left: 10px;
        transform: translateY(-50%);
    }
    
    .kofi-content {
        max-width: 100%;
        margin: 0;
    }
    
    .donate-button-footer {
        font-size: 0.85rem;
        padding: 10px 16px;
    }
    
    .footer-content {
        gap: 15px;
    }
}