﻿* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #FFF 0%, #666666 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
header {
    background: #F7F7F7;
    padding: 20px 40px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-bottom: 3px solid #FF7200;
}

    header h1 {
        color: #333;
        font-size: 32px;
        font-weight: 700;
        letter-spacing: -0.5px;
    }

    header p {
        color: #888;
        font-size: 14px;
        margin-top: 4px;
    }
.main-content {
    flex: 1;
    padding: 40px 20px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.content-wrapper {
    width: 100%;
    max-width: 900px;
}

.section {
    margin-bottom: 30px;
}

.section-title {
    font-size: 16px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.input-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 15px;
}

@media (max-width: 600px) {
    .input-group {
        grid-template-columns: 1fr;
    }
}

label {
    display: block;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 6px;
    font-size: 14px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

input[type="file"],
select,
input[type="number"] {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.3s;
    font-family: inherit;
    background: rgba(255, 255, 255, 0.9);
    color: #333;
}

    input[type="file"]::file-selector-button {
        background: #FF7200;
        color: white;
        border: none;
        padding: 8px 16px;
        border-radius: 4px;
        cursor: pointer;
        font-weight: 600;
        margin-right: 10px;
        transition: background 0.3s;
    }

        input[type="file"]::file-selector-button:hover {
            background: #DB6400;
        }

    select:focus,
    input[type="number"]:focus,
    input[type="file"]:focus {
        outline: none;
        border-color: rgba(255, 255, 255, 0.8);
        box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.2);
        background: rgba(255, 255, 255, 0.95);
    }

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

    .checkbox-group input[type="checkbox"] {
        width: 18px;
        height: 18px;
        cursor: pointer;
        accent-color: #FF7200;
    }

    .checkbox-group label {
        margin-bottom: 0;
        cursor: pointer;
        color: rgba(255, 255, 255, 0.85);
        text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    }

.preview-container {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    border: 2px dashed rgba(255, 255, 255, 0.4);
    text-align: center;
    position: relative;
    backdrop-filter: blur(10px);
}

    .preview-container.active {
        border-color: rgba(255, 255, 255, 0.8);
        background: rgba(255, 255, 255, 0.15);
    }

    .preview-container p {
        color: rgba(255, 255, 255, 0.6);
    }

#imagePreview {
    max-width: 100%;
    max-height: 400px;
    border-radius: 6px;
    display: none;
    cursor: crosshair;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

    #imagePreview.loaded {
        display: block;
    }

#canvas {
    display: none;
    max-width: 100%;
    border-radius: 6px;
    margin-top: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

    #canvas.show {
        display: block;
    }

.button-group {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 12px;
    margin-top: 20px;
}

@media (max-width: 600px) {
    .button-group {
        grid-template-columns: 1fr;
    }
}

button {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-primary {
    background: #FF7200;
    color: white;
}

    .btn-primary:hover {
        background: #DB6400;
        transform: translateY(-2px);
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    }

    .btn-primary:disabled {
        background: rgba(255, 255, 255, 0.3);
        cursor: not-allowed;
        transform: none;
    }

.btn-secondary {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.4);
}

    .btn-secondary:hover {
        background: rgba(255, 255, 255, 0.3);
        transform: translateY(-2px);
        border-color: rgba(255, 255, 255, 0.6);
    }

    .btn-secondary:disabled {
        opacity: 0.4;
        cursor: not-allowed;
        transform: none;
    }

.btn-success {
    background: #10b981;
    color: white;
}

    .btn-success:hover {
        background: #059669;
        transform: translateY(-2px);
        box-shadow: 0 10px 20px rgba(16, 185, 129, 0.4);
    }

    .btn-success:disabled {
        background: rgba(255, 255, 255, 0.3);
        cursor: not-allowed;
        transform: none;
    }

.info-text {
    color: rgba(255, 255, 255, 0.7);
    font-size: 12px;
    margin-top: 6px;
}

.hidden-input {
    display: none;
}

.cropper-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

    .cropper-overlay.active {
        display: flex;
    }

.cropper-modal {
    background: white;
    border-radius: 12px;
    padding: 30px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.cropper-image-container {
    position: relative;
    width: 100%;
    margin-bottom: 20px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    background: #f5f5f5;
}

.cropper-image {
    width: 100%;
    display: block;
    position: relative;
}

.crop-box {
    position: absolute;
    border: 2px solid #FF7200;
    background: rgba(255, 114, 0, 0.1);
    cursor: move;
    z-index: 10;
}

.crop-handle {
    position: absolute;
    width: 10px;
    height: 10px;
    background: #FF7200;
    border: 2px solid white;
    border-radius: 50%;
    cursor: pointer;
    z-index: 11;
}

.close-modal {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #ff6b6b;
    color: white;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

    .close-modal:hover {
        background: #ff5252;
    }

.success-message {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 15px;
    display: none;
}

    .success-message.show {
        display: block;
        animation: slideDown 0.3s ease;
    }

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.size-info {
    background: rgba(255, 114, 0, 0.2);
    border: 1px solid rgba(255, 114, 0, 0.4);
    color: #FF7200;
    padding: 10px 12px;
    border-radius: 6px;
    font-size: 13px;
    margin-top: 10px;
}
footer {
    background: rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    padding: 30px 40px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    margin-top: auto;
}

.footer-nav {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
    max-width: 900px;
    margin: 0 auto;
}

    .footer-nav a {
        color: rgba(255, 255, 255, 0.85);
        text-decoration: none;
        font-size: 14px;
        font-weight: 500;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        transition: all 0.3s;
        border-bottom: 2px solid transparent;
    }

        .footer-nav a:hover {
            color: rgba(255, 255, 255, 1);
            border-bottom-color: rgba(255, 255, 255, 0.6);
        }

.footer-bottom {
    text-align: center;
    margin-top: 20px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
}

@media (max-width: 768px) {
    header {
        padding: 15px 20px;
    }

        header h1 {
            font-size: 24px;
        }

    .main-content {
        padding: 20px 20px;
    }

    footer {
        padding: 20px 20px;
    }

    .footer-nav {
        gap: 20px;
    }
}
