* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #1a1a1a;
    color: #e0e0e0;
    overflow-y: auto;
    overflow-x: hidden;
}

@media (max-width: 768px) {
    body {
        overflow: auto;
    }
}

.container {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

header {
    background: linear-gradient(135deg, #1a1a1a 0%, #262626 100%);
    color: #fff;
    border-bottom: 2px solid #00d4ff;
    padding: 20px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 212, 255, 0.2);
}

header h1 {
    font-size: 28px;
    margin-bottom: 5px;
}

header p {
    font-size: 14px;
    opacity: 0.9;
}

.upload-link {
    color: #00d4ff;
    text-decoration: none;
    font-size: 13px;
    padding: 8px 15px;
    border: 1px solid #00d4ff;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.upload-link:hover {
    background: rgba(0, 212, 255, 0.1);
    color: #00ffff;
    border-color: #00ffff;
}

.main-content {
    display: flex;
    flex: 1;
    overflow: hidden;
    min-height: 0;
}

.sidebar {
    width: 280px;
    background: #252525;
    border-right: 2px solid #00d4ff;
    overflow-y: auto;
    padding: 20px;
    box-shadow: 2px 0 5px rgba(0, 212, 255, 0.1);
}

.templates-section,
.controls-section {
    margin-bottom: 30px;
}

.sidebar h2 {
    font-size: 16px;
    margin-bottom: 15px;
    color: #00d4ff;
    border-bottom: 2px solid #00d4ff;
    padding-bottom: 10px;
}

.template-group {
    margin-bottom: 20px;
}

.template-group-title {
    font-size: 12px;
    font-weight: 600;
    color: #888888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 10px;
    margin-bottom: 8px;
    padding-left: 5px;
    border-left: 2px solid #404040;
}

.template-btn {
    width: 100%;
    padding: 12px;
    margin-bottom: 10px;
    border: 2px solid #404040;
    border-radius: 6px;
    background: #1a1a1a;
    color: #e0e0e0;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 13px;
    font-weight: 500;
}

.template-btn:hover {
    border-color: #00d4ff;
    background-color: #2a2a2a;
    color: #00d4ff;
}

.template-btn.active {
    border-color: #00d4ff;
    background-color: #00d4ff;
    color: #1a1a1a;
}

.control-group {
    margin-bottom: 15px;
}

.control-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
    color: #b0b0b0;
}

.control-group input[type="text"],
.control-group select {
    width: 100%;
    padding: 8px;
    border: 1px solid #404040;
    border-radius: 4px;
    font-size: 13px;
    margin-bottom: 8px;
    font-family: inherit;
    background-color: #1a1a1a;
    color: #e0e0e0;
}

.control-group input[type="text"]:focus,
.control-group select:focus {
    outline: none;
    border-color: #00d4ff;
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.2);
}

.control-group input[type="color"] {
    width: 100%;
    height: 35px;
    border: 1px solid #404040;
    border-radius: 4px;
    cursor: pointer;
    margin-bottom: 8px;
}

.control-group input[type="range"] {
    width: 70%;
    margin-right: 8px;
}

.toggle-group {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}

.mode-btn {
    flex: 1;
    padding: 10px;
    border: 2px solid #404040;
    border-radius: 4px;
    background: #1a1a1a;
    color: #b0b0b0;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 12px;
    font-weight: 600;
}

.mode-btn:hover {
    border-color: #00d4ff;
    color: #00d4ff;
}

.mode-btn.active {
    border-color: #00d4ff;
    background-color: #00d4ff;
    color: #1a1a1a;
}

#fontSizeLabel {
    font-size: 12px;
    color: #808080;
}

.download-btn,
.reset-btn,
.upload-btn,
.fill-all-btn {
    width: 100%;
    padding: 12px;
    margin-top: 10px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.upload-btn {
    background-color: #ff8c00;
    color: white;
    margin-bottom: 10px;
}

.upload-btn:hover {
    background-color: #ff9f1a;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 140, 0, 0.4);
}

.download-btn {
    background-color: #00d4ff;
    color: #1a1a1a;
    margin-bottom: 10px;
    font-weight: 700;
}

.download-btn:hover {
    background-color: #00e8ff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 212, 255, 0.4);
}

.reset-btn {
    background-color: #d9534f;
    color: white;
}

.reset-btn:hover {
    background-color: #e74c3c;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(217, 83, 79, 0.4);
}

.fill-all-btn {
    background-color: #7b68ee;
    color: white;
    margin-bottom: 10px;
}

.fill-all-btn:hover {
    background-color: #8a77ff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(123, 104, 238, 0.4);
}

.canvas-area {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    background: linear-gradient(135deg, #1a1a1a 0%, #262626 100%);
    overflow: hidden;
    position: relative;
    width: 100%;
    min-height: 0;
}

/* Navigation buttons for multi-sheet templates */
.sheet-nav-btn {
    position: absolute;
    width: 50px;
    height: 50px;
    border: none;
    border-radius: 50%;
    background-color: rgba(0, 212, 255, 0.8);
    color: #1a1a1a;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    font-weight: bold;
}

.sheet-nav-btn:hover {
    background-color: #00d4ff;
    transform: scale(1.1);
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.6);
}

.sheet-nav-btn:active {
    transform: scale(0.95);
}

.sheet-nav-prev {
    left: 20px;
}

.sheet-nav-next {
    right: 20px;
}

/* Sheet header indicator */
.sheet-header {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0, 212, 255, 0.1);
    border: 2px solid #00d4ff;
    padding: 12px 20px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    color: #00d4ff;
    z-index: 50;
}

.papers-container {
    display: flex;
    flex-direction: row;
    gap: 40px;
    align-items: center;
    justify-content: center;
    min-width: 0;
    min-height: 0;
}

.papers-container.single-sheet {
    gap: 0;
}

.papers-container.vertical-sheets {
    flex-direction: column;
    gap: 20px;
}

/* Paper - size determined by template */
.paper {
    background: white;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    position: absolute;
    overflow: hidden;
    cursor: crosshair;
    flex-shrink: 0;
    max-width: 100%;
    max-height: 100%;
    min-width: 0;
    min-height: 0;
    left: calc(50% - 140px);
    top: 50%;
    transform: translate(-50%, -50%);
}

.paper-element {
    position: absolute;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: white;
    padding: 12px;
    box-sizing: border-box;
    background-clip: padding-box;
    overflow: hidden;
}

.image-inner {
    cursor: grab;
    user-select: none;
    position: absolute;
    box-sizing: border-box;
    overflow: hidden;
}

.image-inner:active {
    cursor: grabbing;
}

.delete-photo-btn {
    transition: all 0.2s ease;
}

.delete-photo-btn:hover {
    background-color: rgba(255, 0, 0, 1) !important;
    transform: scale(1.1);
}

.delete-photo-btn:active {
    transform: scale(0.95);
}

.grid-overlay {
    position: absolute;
    pointer-events: none;
}

.cut-line {
    border: 1px solid rgba(0, 0, 0, 0.3);
    box-sizing: border-box;
}

.bleed-area {
    border: 2px dashed rgba(255, 68, 68, 0.6);
    box-sizing: border-box;
}

.safe-zone {
    border: 1px dashed rgba(68, 68, 255, 0.6);
    box-sizing: border-box;
}

.photo-label {
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 2px 6px;
    font-size: 10px;
    font-weight: bold;
    border-radius: 2px;
    font-family: monospace;
    user-select: none;
}

.text-banner {
    position: absolute;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    background: white;
    font-family: 'Courier New';
    font-size: 16px;
    font-weight: normal;
    color: #000;
    overflow: hidden;
    word-wrap: break-word;
    padding: 3px;
    line-height: 1.0;
    white-space: pre;
    text-align: center;
}

/* Responsive design */
@media (max-width: 1024px) {
    .sidebar {
        width: 240px;
    }
}

@media (max-width: 768px) {
    .main-content {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #ddd;
        max-height: 200px;
        padding: 15px;
    }

    .canvas-area {
        padding: 20px;
    }
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #1a1a1a;
}

::-webkit-scrollbar-thumb {
    background: #404040;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #00d4ff;
}
/* Calendar Element Styling */
.calendar-container {
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

.calendar-container div {
    overflow: hidden;
    word-wrap: break-word;
}

/* ===== UPLOAD PAGE STYLES ===== */

.upload-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: linear-gradient(135deg, #1a1a1a 0%, #262626 100%);
}

.upload-header {
    background: linear-gradient(135deg, #1a1a1a 0%, #262626 100%);
    color: #fff;
    border-bottom: 2px solid #00d4ff;
    padding: 30px 20px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 212, 255, 0.2);
}

.upload-header h1 {
    font-size: 36px;
    margin-bottom: 8px;
    font-weight: 600;
}

.upload-header p {
    font-size: 16px;
    opacity: 0.8;
    color: #00d4ff;
}

.upload-main {
    flex: 1;
    max-width: 1000px;
    margin: 0 auto;
    padding: 40px 20px;
    width: 100%;
    overflow-y: auto;
    overflow-x: hidden;
}

.upload-main.preview-active {
    max-width: none;
    overflow: visible;
}

/* ===== USER INFO SCREEN ===== */

.user-info-screen {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
    padding: 40px 20px;
}

.user-info-card {
    background: #252525;
    border: 2px solid #00d4ff;
    border-radius: 12px;
    padding: 40px;
    max-width: 400px;
    width: 100%;
}

.user-info-card h2 {
    font-size: 26px;
    color: #fff;
    margin-bottom: 10px;
    text-align: center;
}

.user-info-card > p {
    font-size: 14px;
    color: #b0b0b0;
    text-align: center;
    margin-bottom: 30px;
}

#userInfoForm {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    color: #00d4ff;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-group input {
    padding: 12px 15px;
    background: #1a1a1a;
    border: 2px solid #333;
    border-radius: 6px;
    color: #fff;
    font-size: 16px;
    font-family: inherit;
    transition: all 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: #00d4ff;
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.2);
}

.form-group input::placeholder {
    color: #666;
}

.form-buttons {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.form-buttons .btn-back {
    flex: 1;
}

.form-buttons .btn {
    flex: 1;
}

/* ===== TEMPLATE SELECTION SCREEN ===== */

.template-selection-screen h2 {
    text-align: center;
    font-size: 28px;
    color: #fff;
    margin-bottom: 40px;
}

.template-section {
    margin-bottom: 50px;
}

.section-title {
    font-size: 18px;
    color: #00d4ff;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #00d4ff;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.template-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.template-option {
    background: #252525;
    border: 3px solid #444;
    border-radius: 12px;
    padding: 0;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.3s ease;
    font-family: inherit;
    display: flex;
    flex-direction: column;
}

.template-option:hover {
    border-color: #00d4ff;
    background: #2a2a2a;
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.2);
    transform: translateY(-5px);
}

.template-option.active {
    border-color: #00ffff;
    background: rgba(0, 212, 255, 0.1);
    box-shadow: 0 0 25px rgba(0, 212, 255, 0.4);
}

.layout-preview {
    width: 100%;
    aspect-ratio: 1;
    background: #888;
    padding: 12px;
    box-sizing: border-box;
}

.layout-preview div div {
    background: rgba(255, 255, 255, 0.5);
    border: 3px solid white;
}

.template-option h3 {
    color: #fff;
    text-align: center;
    padding: 12px 15px 5px;
    font-size: 18px;
}

.template-option h4 {
    color: #fff;
    text-align: center;
    padding: 12px 15px 5px;
    font-size: 16px;
    font-weight: 600;
}

.template-option p {
    color: #b0b0b0;
    text-align: center;
    padding: 0 15px 12px;
    font-size: 13px;
}

/* ===== UPLOAD SECTION ===== */

.upload-header-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid rgba(0, 212, 255, 0.2);
}

.upload-header-info h2 {
    color: #fff;
    font-size: 24px;
    margin: 0;
}

.btn-back {
    background: transparent;
    color: #00d4ff;
    border: 1px solid #00d4ff;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-back:hover {
    background: rgba(0, 212, 255, 0.1);
    color: #00ffff;
    border-color: #00ffff;
}

.upload-section {
    margin-bottom: 30px;
}

.upload-box {
    border: 3px dashed #00d4ff;
    border-radius: 12px;
    padding: 60px 40px;
    text-align: center;
    cursor: pointer;
    background: rgba(0, 212, 255, 0.05);
    transition: all 0.3s ease;
    margin-bottom: 20px;
}

.upload-box:hover {
    background: rgba(0, 212, 255, 0.1);
    border-color: #00ffff;
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.2);
}

.upload-box.dragover {
    background: rgba(0, 212, 255, 0.15);
    border-color: #00ffff;
    box-shadow: 0 0 30px rgba(0, 212, 255, 0.3);
}

.upload-icon {
    width: 60px;
    height: 60px;
    color: #00d4ff;
    margin-bottom: 20px;
    stroke-width: 1.5;
}

.upload-box h3 {
    font-size: 22px;
    color: #fff;
    margin-bottom: 8px;
}

.upload-box p {
    font-size: 14px;
    color: #b0b0b0;
}

.file-info {
    margin-bottom: 30px;
    text-align: center;
}

.file-info p {
    color: #00d4ff;
    font-size: 15px;
    margin: 5px 0;
}

/* Preview Section */
.preview-section {
    margin-bottom: 30px;
}

.preview-section h3 {
    font-size: 18px;
    color: #fff;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #00d4ff;
}

.photos-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 15px;
}

.gallery-placeholder {
    grid-column: 1 / -1;
    text-align: center;
    color: #666;
    padding: 40px;
    font-size: 14px;
}

.photo-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    background: #333;
    aspect-ratio: 1;
    border: 2px solid #444;
    transition: all 0.3s ease;
}

.photo-item:hover {
    border-color: #00d4ff;
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.3);
}

.photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.photo-number {
    position: absolute;
    top: 0;
    left: 0;
    background: rgba(0, 212, 255, 0.9);
    color: #000;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 13px;
    border-radius: 0 0 6px 0;
}

.remove-photo {
    position: absolute;
    top: 0;
    right: 0;
    background: rgba(255, 60, 60, 0.9);
    color: white;
    border: none;
    width: 32px;
    height: 32px;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0 8px 0 8px;
    opacity: 0;
    transition: opacity 0.2s ease;
    padding: 0;
}

.photo-item:hover .remove-photo {
    opacity: 1;
}

.remove-photo:hover {
    background: rgba(255, 30, 30, 1);
}

.photo-checkbox {
    position: absolute;
    bottom: 8px;
    right: 8px;
    width: 24px;
    height: 24px;
    cursor: pointer;
    accent-color: #00d4ff;
}

.photo-checkbox:hover {
    transform: scale(1.1);
}

/* Action Buttons */
.upload-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    padding: 30px;
    background: rgba(0, 212, 255, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(0, 212, 255, 0.2);
}

.btn {
    padding: 15px 40px;
    font-size: 16px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-primary {
    background: linear-gradient(135deg, #00d4ff 0%, #00ffff 100%);
    color: #000;
    box-shadow: 0 4px 15px rgba(0, 212, 255, 0.3);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 212, 255, 0.4);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.min-photos-note {
    color: #888;
    font-size: 13px;
    margin-top: 5px;
    height: 18px;
}

/* ===== PREVIEW SCREEN ===== */

.preview-screen {
    display: flex;
    flex-direction: column;
    padding: 20px 0;
    min-height: 100vh;
    min-width: 1056px;
    gap: 15px;
    overflow: hidden;
    box-sizing: border-box;
}

.preview-header {
    display: flex;
    justify-content: space-evenly;
    align-items: center;
    flex-shrink: 0;
    gap: 20px;
    padding: 0 20px;
}

.preview-header h2 {
    font-size: 28px;
    color: #fff;
    margin: 0;
}

.preview-header-buttons {
    display: flex;
    gap: 15px;
    align-items: center;
}

.preview-canvas-container {
    display: flex;
    justify-content: center;
    /* align-items: center; */
    overflow: auto;
    background: #222;
    /* border-radius: 12px; */
    padding: 0;
    flex: 0 1 auto;
    max-height: 70vh;
    min-width: 1056px;
    box-sizing: border-box;
}

.preview-paper {
    background: white;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
    cursor: crosshair;
    flex-shrink: 0;
    width: auto;
    height: auto;
    max-width: none;
    max-height: 100%;
    aspect-ratio: auto;
    min-width: 0;
    min-height: 0;
}

#confirmDownloadButton {
    width: fit-content;
    margin: 20px auto;
}

/* ===== SUCCESS SCREEN ===== */

.success-section {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
    padding: 40px 20px;
}

.success-message {
    text-align: center;
    background: rgba(0, 255, 100, 0.05);
    border: 2px solid #00ff64;
    border-radius: 12px;
    padding: 50px 40px;
    max-width: 500px;
}

.success-icon {
    width: 80px;
    height: 80px;
    color: #00ff64;
    margin: 0 auto 20px;
    stroke-width: 2;
}

.success-message h2 {
    font-size: 28px;
    color: #fff;
    margin-bottom: 15px;
}

.success-message p {
    color: #b0b0b0;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 10px;
}

/* Responsive */
@media (max-width: 768px) {
    .upload-main {
        padding: 20px;
    }

    .user-info-card {
        padding: 30px 20px;
    }

    .user-info-card h2 {
        font-size: 22px;
    }

    .form-buttons {
        flex-direction: column;
    }

    .template-selection-screen h2 {
        font-size: 22px;
        margin-bottom: 30px;
    }

    .section-title {
        font-size: 16px;
        margin-bottom: 15px;
    }

    .template-grid {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
        gap: 12px;
    }

    .template-option h4 {
        font-size: 14px;
    }

    .upload-box {
        padding: 40px 20px;
    }

    .upload-box h3 {
        font-size: 18px;
    }

    .upload-icon {
        width: 45px;
        height: 45px;
    }

    .photos-gallery {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }

    .btn {
        width: 100%;
        max-width: 300px;
    }

    .upload-header-info {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }

    .btn-back {
        width: 100%;
        text-align: center;
    }

    .preview-screen {
        min-width: 0;
        min-height: auto;
        padding: 15px 0;
        overflow: visible;
    }

    .preview-canvas-container {
        min-width: 0;
        overflow-x: auto;
        overflow-y: visible;
        max-height: none;
        padding: 0;
        justify-content: flex-start;
        display: block;
    }

    .preview-header {
        padding: 0 10px;
        flex-wrap: wrap;
        gap: 10px;
    }

    .preview-header h2 {
        font-size: 20px;
    }

    .preview-header-buttons {
        width: 100%;
    }

    .preview-header-buttons .btn-back {
        width: auto;
    }

    #confirmDownloadButton {
        margin: 15px auto;
    }

    .upload-container {
        min-height: auto;
        height: auto;
        overflow: visible;
    }

    .upload-main {
        overflow: visible;
        max-width: 100%;
    }
}

/* Mobile-specific styles for small phones */
@media (max-width: 480px) {
    .upload-header {
        padding: 10px 10px;
    }

    .upload-header h1 {
        font-size: 24px;
        margin-bottom: 5px;
    }

    .upload-header p {
        font-size: 14px;
    }

    .upload-main {
        padding: 15px 10px;
        max-width: 100%;
    }

    .user-info-card {
        padding: 20px 15px;
        border-radius: 8px;
        max-width: 100%;
    }

    .user-info-card h2 {
        font-size: 20px;
        margin-bottom: 8px;
    }

    .user-info-card > p {
        font-size: 13px;
        margin-bottom: 20px;
    }

    .form-group {
        gap: 6px;
    }

    .form-group input {
        padding: 10px 12px;
        font-size: 14px;
    }

    .template-selection-screen h2 {
        font-size: 20px;
        margin-bottom: 20px;
    }

    .template-section {
        margin-bottom: 30px;
    }

    .section-title {
        font-size: 14px;
        margin-bottom: 12px;
    }

    .template-grid {
        display: flex;
        flex-direction: column;
        gap: 10px;
        margin-bottom: 20px;
    }

    .template-option {
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 100%;
        min-height: 160px;
        padding: 15px;
    }

    .layout-preview {
        min-width: 100%;
    }

    .template-option h4 {
        font-size: 14px;
        padding: 10px 10px 5px;
    }

    .template-option p {
        font-size: 13px;
        padding: 0 10px 8px;
    }

    .upload-box {
        padding: 30px 15px;
    }

    .upload-box h3 {
        font-size: 16px;
    }

    .upload-icon {
        width: 40px;
        height: 40px;
    }

    .photos-gallery {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
        gap: 8px;
    }

    .btn {
        padding: 12px 15px;
        font-size: 14px;
        max-width: 100%;
    }

    .upload-header-info {
        gap: 10px;
        margin-bottom: 20px;
    }

    .upload-header-info h2 {
        font-size: 20px;
    }
}

/* ===== IMAGE EDITOR SCREEN ===== */

.image-editor-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    min-height: 100vh;
    gap: 20px;
}

.editor-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 800px;
}

.editor-header h2 {
    font-size: 24px;
    color: #fff;
    margin: 0;
}

.editor-header h2 span {
    color: #00d4ff;
    font-size: 18px;
    margin-left: 10px;
}

.editor-container {
    display: flex;
    flex-direction: column;
}

/* ===== LANDING PAGE STYLES ===== */

.landing-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 100%;
    background-color: #f5f5f5;
}

.landing-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: white;
    color: #666;
    border-bottom: 3px solid #e74c3c;
    padding-bottom: 20px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.landing-logo img{
    padding-bottom: 20px;
}

.landing-header h1 {
    font-size: 48px;
    margin-bottom: 15px;
    color: #666;
    font-weight: 700;
    font-style: italic;
}

.landing-header p {
    font-size: 18px;
    opacity: 0.8;
    color: #999;
    margin-bottom: 30px;
}

.cta-button {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: #fff;
    padding: 14px 40px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.3);
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(231, 76, 60, 0.5);
    background: linear-gradient(135deg, #c0392b 0%, #a93226 100%);
}

.features-section {
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    background-color: #fff;
}

.landing-section-title {
    font-size: 36px;
    color: #666;
    text-align: center;
    border-bottom: 3px solid #e74c3c;
    padding: 20px 0 20px 0;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    padding: 20px 0 20px 0;
}

.feature-card {
    background: #ffffff;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.feature-card:hover {
    border-color: #e74c3c;
    box-shadow: 0 4px 20px rgba(231, 76, 60, 0.15);
    transform: translateY(-5px);
}

.feature-icon {
    text-align: center;
    font-size: 40px;
    margin-bottom: 15px;
}

.feature-card h3 {
    text-align: center;
    color: #666;
    margin-bottom: 10px;
    font-size: 20px;
    font-weight: 600;
}

.feature-card p {
    color: #999;
    line-height: 1.6;
    font-size: 14px;
}

.templates-showcase {
    padding: 20px 0 20px 0;
    background-color: white;
}

.templates-showcase h2 {
    font-size: 36px;
    color: #666;
    text-align: center;
    border-bottom: 3px solid #e74c3c;
    padding-bottom: 20px;
}

.template-showcase-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    max-width: 1200px;
    margin: 0 auto;
}

.template-showcase-card {
    background: #ffffff;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.template-showcase-card:hover {
    border-color: #e74c3c;
    box-shadow: 0 4px 20px rgba(231, 76, 60, 0.15);
}

.template-preview {
    background: #f5f5f5;
    border: 2px dashed #e74c3c;
    border-radius: 4px;
    /* padding: 20px 0 20px 0; */
    margin-bottom: 15px;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #e74c3c;
    font-size: 12px;
}

.template-showcase-card h4 {
    color: #666;
    margin-bottom: 8px;
    font-size: 16px;
    font-weight: 600;
}

.template-showcase-card p {
    color: #999;
    font-size: 13px;
    line-height: 1.4;
}

.how-it-works {
    padding: 20px 0 20px ;
    background: #fff;
}

.how-it-works h2 {
    font-size: 36px;
    color: #666;
    text-align: center;
    margin-bottom: 50px;
    border-bottom: 3px solid #e74c3c;
    padding-bottom: 20px;
}

.steps-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    max-width: 1000px;
    margin: 0 auto;
}

.step {
    text-align: center;
    position: relative;
}

.step-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: #fff;
    font-size: 28px;
    font-weight: bold;
    border-radius: 50%;
    margin: 0 auto 20px;
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.3);
}

.step h3 {
    color: #666;
    margin-bottom: 10px;
    font-size: 18px;
    font-weight: 600;
}

.step p {
    color: #999;
    font-size: 14px;
    line-height: 1.6;
}

.landing-footer {
    background: #f5f5f5;
    border-top: 3px solid #e74c3c;
    padding: 40px 20px;
    text-align: center;
    color: #999;
    margin-top: auto;
}

.landing-footer p {
    margin-bottom: 20px;
}

.cta-section {
    padding: 50px 20px;
    background: #fff;
    text-align: center;
    border-top: 3px solid #e74c3c;
    border-bottom: 3px solid #e74c3c;
}

.cta-section h2 {
    font-size: 32px;
    color: #666;
    margin-bottom: 20px;
    font-weight: 700;
}

.cta-section p {
    font-size: 18px;
    color: #999;
    margin-bottom: 30px;
}

@media (max-width: 768px) {
    .landing-header h1 {
        font-size: 32px;
    }

    .landing-header p {
        font-size: 16px;
    }

    .landing-section-title,
    .templates-showcase h2,
    .how-it-works h2 {
        font-size: 24px;
    }

    .features-grid,
    .template-showcase-grid {
        grid-template-columns: 1fr;
    }

    .steps-container {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

.editor-canvas-area {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    background: #ffffff;
    border-radius: 12px;
    padding: 0;
    border: 2px solid #333;
    overflow: hidden;
    min-height: 350px;
    max-height: 65vh;
}

.editor-photo-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 350px;
    max-height: 65vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.editor-photo-wrapper img {
    position: absolute;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    cursor: grab;
    user-select: none;
    -webkit-user-drag: none;
    transition: none;
    z-index: 1;
}

.editor-photo-wrapper img:active {
    cursor: grabbing;
}

.crop-frame {
    position: absolute;
    border: 3px solid #00d4ff;
    box-shadow: 0 0 0 9999px rgba(255, 255, 255, 0.7);
    pointer-events: none;
    z-index: 10;
}

.editor-toolbar {
    display: flex;
    align-items: flex-end;
    gap: 15px;
    width: 100%;
}

.zoom-control {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.btn-rotate {
    background: #333;
    color: #fff;
    border: 2px solid #555;
    padding: 10px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.btn-rotate:hover {
    background: #444;
    border-color: #00d4ff;
    color: #00d4ff;
}

.zoom-control label {
    color: #00d4ff;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.zoom-slider-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.zoom-slider-row input[type="range"] {
    flex: 1;
    height: 6px;
    -webkit-appearance: none;
    appearance: none;
    background: #333;
    border-radius: 3px;
    outline: none;
}

.zoom-slider-row input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #00d4ff;
    cursor: pointer;
}

.zoom-slider-row input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #00d4ff;
    cursor: pointer;
    border: none;
}

.zoom-label {
    color: #b0b0b0;
    font-size: 18px;
    font-weight: bold;
    width: 20px;
    text-align: center;
}

.zoom-value {
    color: #00d4ff;
    font-size: 14px;
    font-weight: 600;
    min-width: 45px;
    text-align: right;
}

.editor-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    width: 100%;
    max-width: 500px;
}

.control-info {
    text-align: center;
}

.control-info p {
    color: #b0b0b0;
    font-size: 14px;
    margin: 4px 0;
}

.control-info .cut-dimensions {
    color: #00d4ff;
    font-weight: 600;
    font-size: 15px;
}

.control-buttons {
    display: flex;
    gap: 15px;
    width: 100%;
}

.control-buttons .btn {
    flex: 1;
}

.btn-secondary {
    background: #333;
    color: #fff;
    border: 2px solid #555;
    padding: 15px 40px;
    font-size: 16px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-secondary:hover:not(:disabled) {
    background: #444;
    border-color: #00d4ff;
    color: #00d4ff;
}

.btn-secondary:disabled,
.btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

#doneEditingButton {
    width: 100%;
}

@media (max-width: 768px) {
    .editor-canvas-area {
        min-height: 280px;
    }

    .control-buttons {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .image-editor-screen {
        padding: 10px;
    }

    .editor-canvas-area {
        min-height: 240px;
        border-radius: 8px;
    }

    .editor-header h2 {
        font-size: 20px;
    }
}