/* Cropadoodledoo Stylesheet - /assets/css/style.css */

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Nunito', sans-serif;
    background: linear-gradient(135deg, #87CEEB 0%, #98FB98 100%);
    min-height: 100vh;
    color: #2c3e50;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 3px solid #FFD700;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 15px 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
}

.chicken-logo {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

.logo-text h1 {
    font-family: 'Fredoka One', cursive;
    font-size: 2.5rem;
    color: #FF6B6B;
    margin: 0;
}

.tagline {
    font-size: 1rem;
    color: #666;
    font-weight: 600;
}

/* Main Content */
main {
    padding: 40px 0;
}

.main-interface {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 40px;
    margin: 30px 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.interface-title {
    text-align: center;
    margin-bottom: 30px;
}

.interface-title h2 {
    font-family: 'Fredoka One', cursive;
    font-size: 2rem;
    color: #FF6B6B;
    margin-bottom: 10px;
}

/* Steps */
.steps {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.step {
    padding: 12px 20px;
    border-radius: 30px;
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
}

.step-1 { background: linear-gradient(135deg, #FFD700, #FFA500); }
.step-2 { background: linear-gradient(135deg, #FF6B6B, #FF4444); }
.step-3 { background: linear-gradient(135deg, #98FB98, #32CD32); }

.step-number {
    background: rgba(255, 255, 255, 0.3);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

/* Content Area */
.content-area {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
    align-items: start;
}

/* Upload Section */
.upload-area {
    border: 3px dashed #FFD700;
    border-radius: 20px;
    padding: 60px 20px;
    background: rgba(255, 215, 0, 0.1);
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.upload-area:hover,
.upload-area:focus {
    border-color: #FF6B6B;
    background: rgba(255, 107, 107, 0.1);
    transform: scale(1.02);
}

.upload-area.dragover {
    border-color: #FF6B6B;
    background: rgba(255, 107, 107, 0.2);
}

.upload-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
}

.upload-text {
    font-size: 1.5rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 10px;
}

.upload-subtext {
    color: #666;
}

#file-input {
    display: none;
}

/* Preview Area */
.preview-area {
    margin-top: 30px;
    display: none;
}

.crop-info {
    text-align: center;
    margin: 15px 0;
    padding: 10px;
    background: rgba(255, 215, 0, 0.1);
    border-radius: 10px;
    font-size: 0.9rem;
    color: #666;
}

.preview-dimensions {
    font-weight: 600;
    color: #FF6B6B;
    margin-top: 5px;
}

.crop-preview-container {
    position: relative;
    width: 400px;
    height: 300px;
    margin: 20px auto;
    border: 3px solid #FFD700;
    border-radius: 15px;
    overflow: hidden;
    background: #f0f0f0;
    cursor: move;
    touch-action: none;
}

.crop-preview-image {
    position: absolute;
    top: 0;
    left: 0;
    user-select: none;
    pointer-events: none;
    display: none;
    will-change: transform;
}

/* Zoom Controls */
.zoom-controls {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 15px 0;
}

.zoom-btn {
    background: #FFD700;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #2c3e50;
}

.zoom-btn:hover {
    background: #FF6B6B;
    color: white;
    transform: scale(1.1);
}

.zoom-slider {
    width: 200px;
    accent-color: #FFD700;
}

/* Sizing Section */
.sizing-section h3 {
    font-family: 'Fredoka One', cursive;
    font-size: 1.5rem;
    color: #FF6B6B;
    margin-bottom: 20px;
    text-align: center;
}

.preset-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 30px;
}

.preset-btn {
    background: linear-gradient(135deg, #87CEEB, #4169E1);
    color: white;
    border: none;
    padding: 15px 10px;
    border-radius: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    font-size: 0.9rem;
    min-height: 44px;
}

.preset-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.preset-btn.active {
    background: linear-gradient(135deg, #FF6B6B, #FF4444);
}

/* Custom Size */
.custom-size {
    background: rgba(255, 215, 0, 0.2);
    padding: 20px;
    border-radius: 15px;
    margin-top: 20px;
}

.custom-size h4 {
    margin-bottom: 15px;
    color: #2c3e50;
}

.size-inputs {
    display: flex;
    gap: 10px;
}

.size-inputs input {
    flex: 1;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 10px;
    font-size: 16px; /* Prevents iOS zoom */
    text-align: center;
}

.size-inputs input:focus {
    outline: none;
    border-color: #FFD700;
}

/* Format Section */
.format-section {
    background: rgba(255, 215, 0, 0.1);
    padding: 20px;
    border-radius: 15px;
    margin-top: 20px;
}

.format-section h4 {
    margin-bottom: 15px;
    color: #2c3e50;
}

.format-options {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.format-btn {
    flex: 1;
    padding: 10px;
    border: 2px solid #ddd;
    background: white;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    min-height: 44px;
}

.format-btn:hover {
    border-color: #FFD700;
    transform: translateY(-2px);
}

.format-btn.active {
    background: #FFD700;
    border-color: #FFD700;
    color: #2c3e50;
}

.quality-container {
    margin-top: 15px;
}

.quality-slider {
    width: 100%;
    margin: 10px 0;
}

/* Crop Button */
.crop-button-container {
    text-align: center;
    margin-top: 40px;
}

.crop-btn {
    background: linear-gradient(135deg, #98FB98, #32CD32);
    color: white;
    border: none;
    padding: 20px 60px;
    border-radius: 50px;
    font-size: 1.5rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Fredoka One', cursive;
}

.crop-btn:hover:not(:disabled) {
    transform: scale(1.05);
    box-shadow: 0 10px 30px rgba(50, 205, 50, 0.4);
}

.crop-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.crop-btn.processing {
    animation: wiggle 0.5s ease-in-out infinite alternate;
}

@keyframes wiggle {
    from { transform: rotate(-3deg); }
    to { transform: rotate(3deg); }
}

.success-message {
    background: #d4edda;
    color: #155724;
    padding: 15px;
    border-radius: 10px;
    margin-top: 20px;
    display: none;
}

/* Ads */
.ad {
    text-align: center;
    margin: 20px auto;
    padding: 10px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 10px;
}

/* SEO Content */
.seo-content {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 20px;
    padding: 40px;
    margin: 30px 0;
}

.seo-content h2 {
    font-family: 'Fredoka One', cursive;
    color: #FF6B6B;
    margin-bottom: 20px;
}

.seo-content h3 {
    color: #2c3e50;
    margin: 25px 0 15px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.feature-card {
    padding: 20px;
    border-radius: 15px;
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: white;
}

.feature-card h3 {
    margin-bottom: 10px;
    color: white;
}

/* Footer */
footer {
    text-align: center;
    padding: 30px 0;
    color: #666;
}

footer a {
    color: #2c3e50;
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .content-area {
        grid-template-columns: 1fr;
    }
    
    .steps {
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
    }
    
    .step {
        justify-content: center;
        min-height: 44px;
    }
    
    .preset-grid {
        grid-template-columns: 1fr;
    }
    
    .logo-text h1 {
        font-size: 1.8rem;
    }
    
    .crop-preview-container {
        width: calc(100vw - 40px);
        max-width: 400px;
        height: min(320px, 50vh);
    }
    
    header {
        position: relative; /* Unsticky on mobile */
    }
    
    .main-interface {
        padding: 25px 15px;
    }
    
    .upload-area {
        padding: 40px 15px;
    }
    
    .crop-btn {
        width: 100%;
        max-width: 320px;
    }
    
    .format-options {
        flex-wrap: wrap;
    }
}

@media (max-width: 380px) {
    .format-options {
        flex-direction: column;
    }
    
    .format-btn {
        width: 100%;
        margin-bottom: 8px;
    }
    
    .size-inputs {
        flex-direction: column;
    }
    
    .size-inputs input {
        width: 100%;
        margin-bottom: 8px;
    }
    
    .logo-text h1 {
        font-size: 1.5rem;
    }
    
    .chicken-logo {
        width: 50px;
        height: 50px;
    }
}

/* Landscape mode */
@media (max-height: 500px) and (orientation: landscape) {
    .crop-preview-container {
        height: 200px;
    }
    
    .main-interface {
        padding: 20px;
    }
    
    header {
        position: relative;
    }
}

/* Disable hover on touch devices */
@media (hover: none) {
    .preset-btn:hover,
    .zoom-btn:hover,
    .format-btn:hover,
    .upload-area:hover {
        transform: none;
    }
}

/* Print styles */
@media print {
    header, .ad, footer, .zoom-controls, .crop-btn {
        display: none;
    }
}