:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --secondary: #06b6d4;
    --accent: #10b981;
    --background: #0f0f23;
    --surface: #1a1a2e;
    --surface-light: #16213e;
    --text-primary: #ffffff;
    --text-secondary: #a1a1aa;
    --text-muted: #71717a;
    --border: rgba(255, 255, 255, 0.1);
    --border-light: rgba(255, 255, 255, 0.05);
    --success: #22c55e;
    --warning: #f59e0b;
    --error: #ef4444;
    --glass: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --shadow: 0 10px 20px -5px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.4);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: linear-gradient(135deg, var(--background) 0%, #1a1a2e 50%, #16213e 100%);
    min-height: 100vh;
    color: var(--text-primary);
    overflow-x: hidden;
    position: relative;
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 20% 80%, rgba(120, 119, 198, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 119, 198, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(120, 219, 255, 0.1) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

.app-container {
    min-height: 100vh;
    padding: 12px;
}

.main-layout {
    background: var(--glass);
    backdrop-filter: blur(20px);
    border-radius: 16px;
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-lg);
    width: 100%;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

@media (min-width: 1024px) {
    .app-container {
        min-height: 100vh;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 20px;
    }

    .main-layout {
        max-width: 1400px;
        display: grid;
        grid-template-columns: 1fr 380px;
        min-height: 800px;
        border-radius: 24px;
    }
}

.main-content {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

@media (min-width: 1024px) {
    .main-content {
        min-height: auto;
    }
}

.header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 50%, var(--secondary) 100%);
    padding: 20px 16px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

@media (min-width: 768px) {
    .header {
        padding: 32px 24px;
    }
}

@media (min-width: 1024px) {
    .header {
        padding: 40px;
    }
}

.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Ccircle cx='30' cy='30' r='2'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.3;
    pointer-events: none;
}

.logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 12px;
    position: relative;
    z-index: 1;
    flex-direction: column;
}

@media (min-width: 768px) {
    .logo-container {
        flex-direction: row;
        gap: 16px;
        margin-bottom: 16px;
    }
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

@media (min-width: 768px) {
    .logo-icon {
        width: 48px;
        height: 48px;
        border-radius: 12px;
        font-size: 24px;
    }
}

.header h1 {
    font-size: 1.75rem;
    font-weight: 800;
    margin: 0;
    letter-spacing: -0.025em;
    position: relative;
    z-index: 1;
}

@media (min-width: 768px) {
    .header h1 {
        font-size: 2.25rem;
    }
}

@media (min-width: 1024px) {
    .header h1 {
        font-size: 2.75rem;
    }
}

.brand-name {
    background: linear-gradient(135deg, #ffffff 0%, #f1f5f9 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.header p {
    font-size: 0.875rem;
    opacity: 0.9;
    font-weight: 400;
    position: relative;
    z-index: 1;
    margin-top: 6px;
    line-height: 1.4;
}

@media (min-width: 768px) {
    .header p {
        font-size: 1rem;
        margin-top: 8px;
    }
}

.content {
    padding: 16px;
    flex: 1;
}

@media (min-width: 768px) {
    .content {
        padding: 24px;
    }
}

@media (min-width: 1024px) {
    .content {
        padding: 40px;
    }
}

.preview-sidebar {
    background: var(--surface);
    border-left: 1px solid var(--border);
    padding: 32px 24px;
    display: none;
    flex-direction: column;
    gap: 24px;
}

@media (min-width: 1024px) {
    .preview-sidebar {
        display: flex;
    }
}

.preview-header {
    text-align: center;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}

.preview-title {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 6px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.preview-subtitle {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.preview-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface-light);
    border-radius: 16px;
    border: 2px dashed var(--border);
    min-height: 320px;
    position: relative;
    transition: all 0.3s ease;
}

.preview-container.has-image {
    border: 1px solid var(--border);
    border-style: solid;
    background: var(--surface);
}

.preview-empty {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
}

.preview-canvas-sidebar {
    max-width: 100%;
    max-height: 100%;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.preview-info {
    background: var(--surface-light);
    border-radius: 16px;
    padding: 20px;
    border: 1px solid var(--border);
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-light);
}

.info-item:last-child {
    border-bottom: none;
}

.info-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.info-value {
    font-size: 0.875rem;
    color: var(--text-primary);
    font-weight: 600;
}

.upload-zone {
    border: 2px dashed var(--border);
    border-radius: 16px;
    padding: 40px 20px;
    text-align: center;
    margin-bottom: 24px;
    background: var(--surface);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    touch-action: manipulation;
}

@media (min-width: 768px) {
    .upload-zone {
        padding: 60px 30px;
        margin-bottom: 32px;
        border-radius: 20px;
    }
}

.upload-zone::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.1), transparent);
    transition: left 0.6s ease;
}

.upload-zone:hover {
    border-color: var(--primary);
    background: var(--surface-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.upload-zone:hover::before {
    left: 100%;
}

.upload-zone.dragover {
    border-color: var(--primary);
    background: var(--surface-light);
    transform: scale(1.01);
    box-shadow: var(--shadow-lg);
}

.upload-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 16px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
    box-shadow: 0 8px 32px rgba(99, 102, 241, 0.3);
}

@media (min-width: 768px) {
    .upload-icon {
        width: 64px;
        height: 64px;
        border-radius: 20px;
        font-size: 24px;
        margin-bottom: 20px;
    }
}

.upload-text {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 6px;
    background: linear-gradient(135deg, var(--text-primary), var(--text-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

@media (min-width: 768px) {
    .upload-text {
        font-size: 1.25rem;
        margin-bottom: 8px;
    }
}

.upload-subtext {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 500;
    line-height: 1.4;
}

@media (min-width: 768px) {
    .upload-subtext {
        font-size: 0.9rem;
    }
}

.file-input {
    display: none;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    margin-bottom: 24px;
}

@media (min-width: 768px) {
    .form-grid {
        grid-template-columns: 1fr 1fr;
        gap: 20px;
        margin-bottom: 32px;
    }
}

@media (min-width: 1024px) {
    .form-grid {
        gap: 24px;
    }
}

.form-field {
    position: relative;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: 0.025em;
}

@media (min-width: 768px) {
    .form-label {
        margin-bottom: 10px;
    }
}

.form-input {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: 16px;
    font-family: inherit;
    font-weight: 500;
    transition: all 0.3s ease;
    background: var(--surface);
    color: var(--text-primary);
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

@media (min-width: 768px) {
    .form-input {
        padding: 16px 20px;
        border-radius: 12px;
        font-size: 1rem;
    }
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
    background: var(--surface-light);
    transform: translateY(-1px);
}

@media (min-width: 768px) {
    .form-input:focus {
        box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
        transform: translateY(-2px);
    }
}

.form-input::placeholder {
    color: var(--text-muted);
}

.controls-panel {
    display: none;
    background: var(--surface);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 24px;
    border: 1px solid var(--border);
}

@media (min-width: 768px) {
    .controls-panel {
        border-radius: 20px;
        padding: 32px;
        margin-bottom: 32px;
    }
}

.controls-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 20px;
    text-align: center;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

@media (min-width: 768px) {
    .controls-title {
        font-size: 1.125rem;
        margin-bottom: 24px;
    }
}

.controls-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

@media (min-width: 480px) {
    .controls-grid {
        grid-template-columns: 1fr 1fr;
        gap: 20px;
    }
}

@media (min-width: 768px) {
    .controls-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 24px;
    }
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

@media (min-width: 768px) {
    .control-group {
        gap: 12px;
    }
}

.control-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

@media (min-width: 768px) {
    .control-label {
        font-size: 0.8rem;
    }
}

.range-input {
    -webkit-appearance: none;
    appearance: none;
    height: 6px;
    background: var(--surface-light);
    border-radius: 3px;
    outline: none;
    cursor: pointer;
    border: 1px solid var(--border);
}

@media (min-width: 768px) {
    .range-input {
        height: 8px;
        border-radius: 4px;
    }
}

.range-input::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
    transition: transform 0.2s ease;
}

@media (min-width: 768px) {
    .range-input::-webkit-slider-thumb {
        width: 24px;
        height: 24px;
        box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
    }
}

.range-input::-webkit-slider-thumb:hover {
    transform: scale(1.1);
}

.range-input::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 50%;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

@media (min-width: 768px) {
    .range-input::-moz-range-thumb {
        width: 24px;
        height: 24px;
        box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
    }
}

.range-value {
    font-size: 0.8rem;
    color: var(--text-primary);
    font-weight: 600;
    text-align: center;
    background: var(--surface-light);
    padding: 6px 10px;
    border-radius: 6px;
    border: 1px solid var(--border);
}

@media (min-width: 768px) {
    .range-value {
        font-size: 0.875rem;
        padding: 8px 12px;
        border-radius: 8px;
    }
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(12px);
    z-index: 1000;
    display: none;
    align-items: flex-start;
    justify-content: center;
    padding: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.modal-overlay.active {
    display: flex;
}

.crop-modal {
    background: var(--surface);
    border-radius: 16px 16px 0 0;
    padding: 16px;
    width: 100%;
    min-height: 100vh;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
    position: relative;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    margin-top: auto;
}

@media (min-width: 768px) {
    .modal-overlay {
        align-items: center;
        padding: 20px;
    }

    .crop-modal {
        border-radius: 24px;
        padding: 24px;
        width: 95vw;
        max-width: 1000px;
        max-height: 90vh;
        min-height: auto;
        margin: auto;
    }
}

.crop-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

@media (min-width: 768px) {
    .crop-modal-header {
        margin-bottom: 24px;
        padding-bottom: 16px;
    }
}

.crop-title {
    font-size: 1.25rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

@media (min-width: 768px) {
    .crop-title {
        font-size: 1.5rem;
    }
}

.close-btn {
    background: var(--surface-light);
    border: 1px solid var(--border);
    font-size: 20px;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 8px;
    border-radius: 10px;
    transition: all 0.2s ease;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    touch-action: manipulation;
}

@media (min-width: 768px) {
    .close-btn {
        font-size: 24px;
        padding: 8px 12px;
        border-radius: 12px;
        width: 48px;
        height: 48px;
    }
}

.close-btn:hover {
    background: var(--border);
    color: var(--text-primary);
    transform: scale(1.05);
}

.crop-info {
    background: var(--surface-light);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 16px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-align: center;
    line-height: 1.5;
    flex-shrink: 0;
}

@media (min-width: 768px) {
    .crop-info {
        border-radius: 16px;
        padding: 16px;
        margin-bottom: 20px;
        font-size: 0.875rem;
        line-height: 1.6;
    }
}

.crop-container {
    flex: 1;
    min-height: 200px;
    max-height: 50vh;
    margin-bottom: 16px;
    border-radius: 12px;
    overflow: auto;
    touch-action: pan-x pan-y;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface-light);
}

@media (min-width: 768px) {
    .crop-container {
        min-height: 300px;
        max-height: 60vh;
        margin-bottom: 20px;
        border-radius: 16px;
    }
}

.crop-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.canvas-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
    min-height: 300px;
}

#logoCanvas {
    max-width: 100%;
    max-height: 100%;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    cursor: move;
    display: block;
}

.crop-controls {
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    flex-shrink: 0;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

@media (min-width: 768px) {
    .crop-controls {
        gap: 12px;
        padding-top: 16px;
    }
}

.preview-section {
    text-align: center;
    margin-bottom: 24px;
}

@media (min-width: 768px) {
    .preview-section {
        margin-bottom: 32px;
    }
}

@media (min-width: 1024px) {
    .preview-section {
        display: none;
    }
}

.canvas-wrapper {
    position: relative;
    display: inline-block;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    background: var(--surface);
    max-width: 100%;
}

@media (min-width: 768px) {
    .canvas-wrapper {
        border-radius: 20px;
    }
}

.preview-canvas {
    display: none;
    border-radius: 12px;
    max-width: 100%;
    height: auto;
}

@media (min-width: 768px) {
    .preview-canvas {
        border-radius: 20px;
    }
}

.button-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
}

@media (min-width: 768px) {
    .button-group {
        flex-direction: row;
        justify-content: center;
        gap: 20px;
        flex-wrap: wrap;
    }
}

.btn {
    border: none;
    padding: 14px 24px;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    letter-spacing: 0.025em;
    width: 100%;
    max-width: 280px;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

@media (min-width: 768px) {
    .btn {
        padding: 16px 32px;
        border-radius: 12px;
        font-size: 0.95rem;
        width: auto;
        min-width: 140px;
        max-width: 200px;
    }
}

.crop-controls .btn {
    width: calc(50% - 4px);
    min-width: auto;
    max-width: none;
    padding: 12px 16px;
    font-size: 0.85rem;
}

@media (min-width: 480px) {
    .crop-controls .btn {
        width: auto;
        min-width: 120px;
        padding: 12px 20px;
        font-size: 0.9rem;
    }
}

@media (min-width: 768px) {
    .crop-controls .btn {
        width: auto;
        min-width: 140px;
        padding: 12px 24px;
        font-size: 0.95rem;
    }
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s ease;
}

.btn:active {
    transform: translateY(0);
    transition: none;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(99, 102, 241, 0.4);
}

@media (min-width: 768px) {
    .btn-primary {
        box-shadow: 0 8px 32px rgba(99, 102, 241, 0.3);
    }

    .btn-primary:hover {
        transform: translateY(-3px);
        box-shadow: 0 12px 40px rgba(99, 102, 241, 0.4);
    }
}

.btn-success {
    background: linear-gradient(135deg, var(--accent), var(--success));
    color: white;
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.3);
    display: none;
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(16, 185, 129, 0.4);
}

@media (min-width: 768px) {
    .btn-success {
        box-shadow: 0 8px 32px rgba(16, 185, 129, 0.3);
    }

    .btn-success:hover {
        transform: translateY(-3px);
        box-shadow: 0 12px 40px rgba(16, 185, 129, 0.4);
    }
}

.btn-warning {
    background: linear-gradient(135deg, var(--secondary), var(--warning));
    color: white;
    box-shadow: 0 4px 20px rgba(6, 182, 212, 0.3);
    display: none;
}

.btn-warning:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(6, 182, 212, 0.4);
}

@media (min-width: 768px) {
    .btn-warning {
        box-shadow: 0 8px 32px rgba(6, 182, 212, 0.3);
    }

    .btn-warning:hover {
        transform: translateY(-3px);
        box-shadow: 0 12px 40px rgba(6, 182, 212, 0.4);
    }
}

.btn-dps {
    background: linear-gradient(135deg, #cbcaa5, #005AA7);
    color: white;
    box-shadow: 0 4px 20px rgba(0, 90, 167, 0.3);
    display: none;
}

.btn-dps:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 90, 167, 0.4);
}

@media (min-width: 768px) {
    .btn-dps {
        box-shadow: 0 8px 32px rgba(0, 90, 167, 0.3);
    }

    .btn-dps:hover {
        transform: translateY(-3px);
        box-shadow: 0 12px 40px rgba(0, 90, 167, 0.4);
    }
}

.btn-secondary {
    background: var(--surface);
    color: var(--text-primary);
    border: 1px solid var(--border);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
}

.btn-secondary:hover {
    background: var(--surface-light);
    transform: translateY(-1px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

@media (min-width: 768px) {
    .btn-secondary {
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    }

    .btn-secondary:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    }
}

.btn-danger {
    background: linear-gradient(135deg, var(--error), #dc2626);
    color: white;
    box-shadow: 0 4px 20px rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(239, 68, 68, 0.4);
}

@media (min-width: 768px) {
    .btn-danger {
        box-shadow: 0 8px 32px rgba(239, 68, 68, 0.3);
    }

    .btn-danger:hover {
        transform: translateY(-3px);
        box-shadow: 0 12px 40px rgba(239, 68, 68, 0.4);
    }
}

.footer-brand {
    text-align: center;
    padding: 16px;
    border-top: 1px solid var(--border);
    background: var(--surface);
}

@media (min-width: 768px) {
    .footer-brand {
        padding: 24px;
    }
}

.footer-text {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 500;
    line-height: 1.4;
}

@media (min-width: 768px) {
    .footer-text {
        font-size: 0.875rem;
    }
}

.footer-brand-name {
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.cropper-container {
    border-radius: 12px !important;
}

@media (min-width: 768px) {
    .cropper-container {
        border-radius: 16px !important;
    }
}

.cropper-view-box {
    border: 2px solid var(--primary) !important;
    border-radius: 6px !important;
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.3) !important;
}

@media (min-width: 768px) {
    .cropper-view-box {
        border: 3px solid var(--primary) !important;
        border-radius: 8px !important;
        box-shadow: 0 0 20px rgba(99, 102, 241, 0.3) !important;
    }
}

.cropper-face {
    background-color: rgba(99, 102, 241, 0.1) !important;
}

.cropper-line {
    background-color: var(--primary) !important;
}

.cropper-point {
    background-color: var(--primary) !important;
    box-shadow: 0 0 6px rgba(99, 102, 241, 0.5) !important;
    width: 8px !important;
    height: 8px !important;
}

@media (min-width: 768px) {
    .cropper-point {
        box-shadow: 0 0 8px rgba(99, 102, 241, 0.5) !important;
        width: 10px !important;
        height: 10px !important;
    }
}

@keyframes successPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.success-animation {
    animation: successPulse 0.6s ease-in-out;
}

@supports (padding: max(0px)) {
    .app-container {
        padding-left: max(12px, env(safe-area-inset-left));
        padding-right: max(12px, env(safe-area-inset-right));
        padding-bottom: max(12px, env(safe-area-inset-bottom));
    }

    .crop-modal {
        padding-bottom: max(16px, env(safe-area-inset-bottom));
    }
}

@media screen and (-webkit-min-device-pixel-ratio: 0) {
    .form-input {
        font-size: 16px;
    }
}
