/* Main Styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
}

.upload-section {
    background: #fff;
    border-radius: 10px;
    padding: 30px;
    margin-top: 20px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.05);
}

.upload-section h1 {
    color: #2c3e50;
    text-align: center;
    margin-bottom: 10px;
}

.subtitle {
    color: #7f8c8d;
    text-align: center;
    margin-bottom: 30px;
    font-size: 1.1rem;
}

/* Upload Container */
.upload-container {
    margin: 20px auto;
    text-align: center;
}

.file-input {
    display: none;
}

.file-label {
    display: inline-block;
    padding: 20px 30px;
    background: #f8f9fa;
    border: 2px dashed #3498db;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.file-label:hover {
    background: #e8f4fc;
    border-color: #2980b9;
}

.file-label i {
    font-size: 2rem;
    color: #e74c3c;
    display: block;
    margin-bottom: 0.5rem;
}

.file-label span {
    font-size: 1rem;
    color: #2c3e50;
}

.file-info {
    margin-top: 1rem;
    font-size: 0.9rem;
    color: #7f8c8d;
}

/* Preview Container */
.preview-container {
    margin-top: 30px;
}

.image-wrapper {
    position: relative;
    margin-bottom: 20px;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
}

.selection-instruction {
    padding: 10px;
    background: #f8f9fa;
    text-align: center;
    font-weight: 500;
    color: #3498db;
    border-bottom: 1px solid #ddd;
}

#imageCanvas {
    max-width: 100%;
    display: block;
    margin: 0 auto;
    cursor: crosshair;
}

/* Pixelate Options */
.pixelate-options {
    margin: 20px 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

.select-all-area {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
}

.large-checkbox {
    width: 18px;
    height: 18px;
    margin-right: 10px;
    cursor: pointer;
}

.pixelation-intensity {
    display: flex;
    align-items: center;
    gap: 10px;
}

.pixelation-intensity label {
    font-weight: 500;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
}

.btn {
    padding: 12px 20px;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn i {
    font-size: 1rem;
}

.pixelate-btn {
    background: #3498db;
    color: white;
}

.pixelate-btn:hover {
    background: #2980b9;
}

.pixelate-btn:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
}

.new-btn {
    background: #e67e22;
    color: white;
}

.new-btn:hover {
    background: #d35400;
}

.home-btn {
    background: #9b59b6;
    color: white;
}

.home-btn:hover {
    background: #8e44ad;
}

/* Ad Space */
.ad-space {
    margin: 25px 0;
    padding: 15px;
    background: #f5f5f5;
    border-radius: 8px;
    text-align: center;
    border: 1px dashed #ccc;
}

.ad-content {
    padding: 10px;
    background: #fff;
    border-radius: 5px;
}

.ad-content p {
    margin: 0;
    font-weight: 600;
    color: #2c3e50;
}

.ad-content small {
    color: #7f8c8d;
    font-size: 0.8rem;
}

/* Fullscreen Loading */
.fullscreen-loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loading-content {
    background: white;
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    max-width: 300px;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

.loading-text {
    font-size: 1.1rem;
    color: #333;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 768px) {
    .action-buttons {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
    
    .pixelation-intensity {
        flex-direction: column;
        align-items: flex-start;
    }
}