/* ============================================================================
   Global Styles & Variables
   ============================================================================ */

:root {
    --primary-gradient: linear-gradient(135deg, #ef5350 0%, #e57373 100%);
    --secondary-gradient: linear-gradient(135deg, #ff8a80 0%, #ff5252 100%);
    --success-gradient: linear-gradient(135deg, #66bb6a 0%, #43a047 100%);
    --dark-gradient: linear-gradient(135deg, #424242 0%, #212121 100%);
    --card-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    --card-shadow-hover: 0 15px 50px rgba(0, 0, 0, 0.2);
    --primary-color: #ef5350;
    --primary-dark: #e57373;
}

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

body {
    font-family: 'Inter', 'Roboto', -apple-system, BlinkMacSystemFont, sans-serif;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    overflow-x: hidden;
    font-size: 14px;
}

.gradient-bg {
    background-image: url('../assets/background-image1.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    position: relative;
}

.gradient-bg::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.85) 0%, rgba(239, 83, 80, 0.6) 100%);
    pointer-events: none;
    z-index: 0;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

#app {
    position: relative;
    z-index: 1;
}

/* ============================================================================
   Navigation Bar
   ============================================================================ */

.nav-gradient {
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid rgba(239, 83, 80, 0.3);
}

.nav-gradient .brand-logo {
    font-weight: 600;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
}

.nav-gradient .brand-logo img {
    height: 40px;
    margin-right: 10px;
}

.nav-gradient ul li a {
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
}

.nav-gradient ul li a:hover {
    background: rgba(255, 255, 255, 0.15);
}

.nav-gradient ul li a i {
    margin-right: 4px;
    font-size: 1rem;
}

/* ============================================================================
   Hero Section
   ============================================================================ */

.hero-section {
    padding: 80px 0 60px;
    text-align: center;
    color: white;
    position: relative;
}

.hero-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 15px;
    text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.3);
    animation: fadeInDown 1s ease;
}

.hero-subtitle {
    font-size: 1rem;
    font-weight: 400;
    opacity: 0.95;
    max-width: 700px;
    margin: 0 auto;
    text-shadow: 1px 1px 5px rgba(0, 0, 0, 0.2);
    animation: fadeInUp 1s ease;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================================================
   Main Container
   ============================================================================ */

main.container {
    margin-top: 40px;
    margin-bottom: 60px;
    position: relative;
    z-index: 2;
}

/* ============================================================================
   Cards
   ============================================================================ */

.card {
    border-radius: 12px;
    box-shadow: var(--card-shadow);
    transition: all 0.3s ease;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.card:hover {
    box-shadow: 0 20px 60px rgba(239, 83, 80, 0.3);
    transform: translateY(-2px);
    border-color: rgba(239, 83, 80, 0.3);
}

.card-content {
    padding: 30px;
}

.section-title {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: white;
    display: flex;
    align-items: center;
}

.section-title i {
    margin-right: 10px;
    font-size: 1.6rem;
}

/* ============================================================================
   Stepper
   ============================================================================ */

.stepper-container {
    margin-bottom: 25px;
    padding: 20px;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.stepper {
    display: flex;
    justify-content: space-between;
    list-style: none;
    padding: 0;
    margin: 0;
    position: relative;
}

.stepper::before {
    content: '';
    position: absolute;
    top: 30px;
    left: 10%;
    right: 10%;
    height: 3px;
    background: linear-gradient(90deg, #e0e0e0 0%, #e0e0e0 100%);
    z-index: 0;
}

.step {
    flex: 1;
    text-align: center;
    position: relative;
    z-index: 1;
}

.step-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.step-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-bottom: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.step-title {
    font-size: 0.85rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.8);
    transition: all 0.3s ease;
}

.step.active .step-icon {
    background: var(--primary-gradient);
    color: white;
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(239, 83, 80, 0.4);
}

.step.active .step-title {
    color: white;
    font-weight: 600;
}

.step.completed .step-icon {
    background: var(--success-gradient);
    color: white;
}

.step.completed .step-title {
    color: rgba(255, 255, 255, 0.9);
}

/* ============================================================================
   Step Content
   ============================================================================ */

.step-content {
    display: none;
}

.step-content.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================================================
   File Upload Area
   ============================================================================ */

.file-upload-area {
    border: 3px dashed rgba(239, 83, 80, 0.5);
    border-radius: 16px;
    padding: 60px 40px;
    text-align: center;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
}

.file-upload-area::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(239, 83, 80, 0.15) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.file-upload-area:hover {
    border-color: rgba(239, 83, 80, 0.9);
    background: rgba(239, 83, 80, 0.08);
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(239, 83, 80, 0.25);
}

.file-upload-area:hover::before {
    opacity: 1;
}

.file-upload-area:hover .upload-icon {
    transform: translateY(-8px) scale(1.1);
    color: #ef5350;
}

.file-upload-area:hover .upload-pulse {
    animation: pulse 1.5s ease-in-out infinite;
}

.file-upload-area.drag-over {
    border-color: #ef5350;
    background: rgba(239, 83, 80, 0.15);
    transform: scale(1.02);
    box-shadow: 0 20px 50px rgba(239, 83, 80, 0.4);
}

.file-upload-area.drag-over .upload-icon {
    transform: scale(1.2);
    color: #ef5350;
}

.upload-icon-wrapper {
    position: relative;
    display: inline-block;
    margin-bottom: 20px;
}

.upload-icon {
    font-size: 80px !important;
    color: rgba(255, 255, 255, 0.9);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 2;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

.upload-pulse {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: rgba(239, 83, 80, 0.3);
    z-index: 1;
    opacity: 0;
}

@keyframes pulse {
    0% {
        transform: translate(-50%, -50%) scale(0.8);
        opacity: 0.8;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.2);
        opacity: 0.4;
    }
    100% {
        transform: translate(-50%, -50%) scale(1.5);
        opacity: 0;
    }
}

.upload-text {
    font-size: 1.2rem;
    font-weight: 600;
    color: white;
    margin-bottom: 12px;
    letter-spacing: 0.3px;
}

.upload-or {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
    margin: 15px 0;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.upload-browse-btn {
    background: linear-gradient(135deg, #ef5350 0%, #e57373 100%);
    border: none;
    border-radius: 25px;
    padding: 0 30px;
    height: 45px;
    line-height: 45px;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(239, 83, 80, 0.4);
    transition: all 0.3s ease;
    margin: 10px 0;
}

.upload-browse-btn:hover {
    background: linear-gradient(135deg, #e53935 0%, #ef5350 100%);
    box-shadow: 0 6px 20px rgba(239, 83, 80, 0.5);
    transform: translateY(-2px);
}

.upload-subtext {
    font-size: 0.85rem;
    margin-top: 20px;
    color: rgba(255, 255, 255, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.upload-subtext i {
    font-size: 1rem;
}

/* Preview Image Container */
.preview-image-container {
    position: relative;
    display: inline-block;
    margin-top: 20px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
    max-width: 100%;
}

#preview-img {
    max-width: 100%;
    max-height: 400px;
    display: block;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.preview-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.preview-image-container:hover .preview-overlay {
    opacity: 1;
}

.preview-image-container:hover #preview-img {
    transform: scale(1.05);
}

#remove-image-btn {
    background: #ef5350;
    box-shadow: 0 4px 15px rgba(239, 83, 80, 0.5);
}

#remove-image-btn:hover {
    background: #e53935;
    transform: scale(1.1);
}

.image-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
    padding: 12px 20px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
}

.image-info span {
    display: flex;
    align-items: center;
    gap: 8px;
}

.image-info span:first-child {
    font-weight: 600;
    color: white;
}

/* ============================================================================
   Progress Bars
   ============================================================================ */

.progress {
    background-color: rgba(102, 126, 234, 0.1);
    border-radius: 8px;
    overflow: hidden;
    height: 8px;
}

.progress .determinate,
.progress .gradient-progress {
    background: var(--primary-gradient);
    transition: width 0.3s ease;
}

.progress .indeterminate {
    background: var(--primary-gradient);
}

/* ============================================================================
   Form Elements
   ============================================================================ */

select.browser-default {
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: rgba(0, 0, 0, 0.3);
    color: white;
}

select.browser-default:focus {
    border-color: #ef5350;
    outline: none;
    box-shadow: 0 0 0 3px rgba(239, 83, 80, 0.2);
}

input[type="number"].browser-default {
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: rgba(0, 0, 0, 0.3);
    color: white;
    width: 100%;
}

input[type="number"].browser-default:focus {
    border-color: #ef5350;
    outline: none;
    box-shadow: 0 0 0 3px rgba(239, 83, 80, 0.2);
}

input[type="number"].browser-default::-webkit-inner-spin-button,
input[type="number"].browser-default::-webkit-outer-spin-button {
    opacity: 1;
    height: 40px;
}

input[type="range"] {
    border: none;
    height: 8px;
    border-radius: 4px;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.5) 0%, rgba(239, 83, 80, 0.8) 100%);
}

input[type="range"]::-webkit-slider-thumb {
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #ef5350;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(239, 83, 80, 0.5);
    transition: all 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 4px 15px rgba(239, 83, 80, 0.6);
}

label {
    font-weight: 500;
    color: white;
    margin-bottom: 8px;
    display: block;
    font-size: 0.9rem;
}

/* ============================================================================
   Style Chips
   ============================================================================ */

.style-chips {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 15px;
}

.chip {
    padding: 12px 24px;
    border-radius: 25px;
    background: rgba(0, 0, 0, 0.4);
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.chip:hover {
    background: rgba(239, 83, 80, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(239, 83, 80, 0.3);
    border-color: rgba(239, 83, 80, 0.3);
}

.chip.active {
    background: var(--primary-gradient);
    color: white;
    border-color: #ef5350;
    box-shadow: 0 4px 15px rgba(239, 83, 80, 0.4);
}

/* ============================================================================
   Buttons
   ============================================================================ */

.btn {
    border-radius: 8px;
    text-transform: none;
    font-weight: 500;
    padding: 0 24px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

.btn:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
    transform: translateY(-2px);
}

.btn-large {
    height: 46px;
    line-height: 46px;
    font-size: 0.95rem;
}

.gradient-btn {
    background: var(--primary-gradient);
    border: none;
    color: white !important;
}

.gradient-btn:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    color: white !important;
}

.nav-buttons {
    display: flex;
    justify-content: space-between;
    padding: 18px 25px;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 0 0 12px 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* ============================================================================
   Export Summary
   ============================================================================ */

.export-summary {
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    border-left: 4px solid #ef5350;
    border: 1px solid rgba(239, 83, 80, 0.3);
}

.export-summary p {
    margin: 10px 0;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.9);
}

.export-summary strong {
    color: #ef5350;
    font-weight: 600;
}

/* ============================================================================
   Canvas
   ============================================================================ */

#preview-canvas {
    max-width: 100%;
    border: 2px solid rgba(239, 83, 80, 0.3);
    border-radius: 12px;
    margin-top: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    background: rgba(0, 0, 0, 0.2);
}

/* ============================================================================
   Snackbar
   ============================================================================ */

#snackbar {
    visibility: hidden;
    min-width: 250px;
    background-color: #333;
    color: #fff;
    text-align: center;
    border-radius: 8px;
    padding: 16px;
    position: fixed;
    z-index: 1000;
    left: 50%;
    bottom: 30px;
    transform: translateX(-50%);
    font-size: 1rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

#snackbar.show {
    visibility: visible;
    animation: fadein 0.5s, fadeout 0.5s 2.5s;
}

@keyframes fadein {
    from { bottom: 0; opacity: 0; }
    to { bottom: 30px; opacity: 1; }
}

@keyframes fadeout {
    from { bottom: 30px; opacity: 1; }
    to { bottom: 0; opacity: 0; }
}

/* ============================================================================
   Footer
   ============================================================================ */

.footer-gradient {
    background: linear-gradient(135deg, #434343 0%, #000000 100%);
    margin-top: 60px;
}

.page-footer h5 {
    font-weight: 600;
}

.page-footer ul li {
    margin-bottom: 8px;
}

.page-footer ul li a {
    transition: all 0.3s ease;
}

.page-footer ul li a:hover {
    color: white !important;
    padding-left: 5px;
}

.footer-copyright {
    background: rgba(0, 0, 0, 0.3);
}

.footer-copyright a {
    text-decoration: underline;
}

.footer-copyright a:hover {
    color: #667eea !important;
}

/* ============================================================================
   Step Descriptions & Helper Text
   ============================================================================ */

.step-description {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 25px;
    line-height: 1.6;
}

.helper-text {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 5px;
    display: block;
}

.value-badge {
    display: inline-block;
    background: var(--primary-gradient);
    color: white;
    padding: 3px 12px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.85rem;
    margin-left: 8px;
    box-shadow: 0 2px 8px rgba(239, 83, 80, 0.3);
}

/* ============================================================================
   Success Messages & Info Cards
   ============================================================================ */

.success-message {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #66bb6a;
    font-weight: 500;
    font-size: 0.95rem;
    padding: 12px;
    background: rgba(102, 187, 106, 0.15);
    border-radius: 8px;
    border-left: 4px solid #66bb6a;
}

.success-message i {
    font-size: 1.1rem;
}

.info-card {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    background: rgba(33, 150, 243, 0.15);
    border: 1px solid rgba(33, 150, 243, 0.3);
    border-radius: 12px;
    padding: 18px;
    margin: 20px 0;
}

.info-card i {
    color: #42a5f5;
    font-size: 1.8rem;
    flex-shrink: 0;
}

.info-title {
    font-size: 1rem;
    font-weight: 600;
    color: white;
    margin-bottom: 5px;
}

.info-subtitle {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
}

.highlight-text {
    color: #ef5350;
    font-weight: 700;
}

/* ============================================================================
   Preview Container
   ============================================================================ */

.preview-container {
    margin-top: 25px;
    padding: 20px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.preview-label {
    font-size: 0.95rem;
    font-weight: 600;
    color: white;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.preview-label i {
    color: #ef5350;
}

.preview-status {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
    font-style: italic;
}

/* ============================================================================
   Export Instructions
   ============================================================================ */

.export-instructions {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    background: rgba(255, 152, 0, 0.15);
    border: 1px solid rgba(255, 152, 0, 0.3);
    border-radius: 12px;
    padding: 18px;
    margin: 25px 0;
}

.export-instructions i {
    color: #ffa726;
    font-size: 1.8rem;
    flex-shrink: 0;
}

.instruction-title {
    font-size: 1rem;
    font-weight: 600;
    color: white;
    margin-bottom: 10px;
}

.instruction-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.instruction-list li {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.85);
    padding: 6px 0;
    padding-left: 20px;
    position: relative;
}

.instruction-list li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: #ffa726;
    font-weight: bold;
    font-size: 1.2rem;
}

/* ============================================================================
   Export Summary
   ============================================================================ */

.summary-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: white;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.summary-value {
    color: #ef5350;
    font-weight: 600;
}

/* ============================================================================
   Responsive Design
   ============================================================================ */

@media only screen and (max-width: 768px) {
    .hero-title {
        font-size: 1.5rem;
    }
    
    .hero-subtitle {
        font-size: 0.9rem;
    }
    
    .stepper {
        flex-direction: column;
        gap: 20px;
    }
    
    .stepper::before {
        display: none;
    }
    
    .step-icon {
        width: 45px;
        height: 45px;
        font-size: 20px;
    }
    
    .nav-buttons {
        flex-direction: column;
        gap: 12px;
    }
    
    .nav-buttons .btn {
        width: 100%;
    }
    
    .style-chips {
        flex-direction: column;
    }
    
    .chip {
        width: 100%;
        text-align: center;
    }
}
