/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
header {
    text-align: center;
    margin-bottom: 40px;
    color: white;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

header p {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* Main Content */
.main-content {
    background: white;
    border-radius: 15px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    overflow: hidden;
}

/* Steps */
.step {
    padding: 40px;
}

.step-header {
    display: flex;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
}

.step-number {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-right: 15px;
}

.step-header h2 {
    color: #333;
    font-size: 1.8rem;
}

/* Upload Area */
.upload-area {
    border: 3px dashed #667eea;
    border-radius: 15px;
    padding: 60px 20px;
    text-align: center;
    background: #f8f9ff;
    transition: all 0.3s ease;
    cursor: pointer;
}

.upload-area:hover {
    border-color: #764ba2;
    background: #f0f2ff;
}

.upload-area i {
    font-size: 3rem;
    color: #667eea;
    margin-bottom: 20px;
}

.upload-area p {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 20px;
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

.btn-success {
    background: linear-gradient(135deg, #56ab2f, #a8e6cf);
    color: white;
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(86, 171, 47, 0.3);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* CSV Preview */
.csv-preview {
    margin-top: 30px;
}

.table-container {
    overflow-x: auto;
    margin-bottom: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

th, td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

th {
    background: #f8f9fa;
    font-weight: 600;
    color: #333;
}

tr:hover {
    background: #f8f9ff;
}

/* Field Mapping */
.field-mapping {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.mapping-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.mapping-item {
    display: flex;
    flex-direction: column;
}

.mapping-item label {
    font-weight: 600;
    margin-bottom: 5px;
    color: #333;
}

.mapping-item select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
}

.mapping-input {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
    width: 100%;
    font-size: 1rem;
}

.mapping-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2);
}

/* Template Grid */
.template-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.template-card {
    border: 2px solid #f0f0f0;
    border-radius: 12px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
}

.template-card:hover {
    border-color: #667eea;
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
}

.template-card.selected {
    border-color: #667eea;
    background: #f8f9ff;
}

.template-preview {
    margin-bottom: 15px;
    transform: scale(0.8);
    transform-origin: top;
}

.template-card h3 {
    color: #333;
    margin-bottom: 10px;
}

.template-card p {
    color: #666;
    font-size: 0.9rem;
}

/* Voucher Preview Styles */
.voucher-preview {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    background: white;
    font-family: 'Courier New', monospace;
    position: relative;
    min-height: 200px;
}

/* Classic Template */
.classic-template {
    background: white;
    border: 2px solid #000;
}

.classic-template .voucher-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #000;
}

.classic-template .voucher-header i {
    font-size: 1.2rem;
}

.classic-template .voucher-header span {
    font-weight: bold;
    font-size: 1.1rem;
}

.classic-template .voucher-header small {
    font-size: 0.8rem;
    margin-left: 5px;
}

.classic-template .field-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.classic-template .label {
    font-weight: bold;
    font-size: 0.9rem;
}

.classic-template .value {
    font-size: 0.9rem;
}

.classic-template .qr-code {
    position: absolute;
    bottom: 10px;
    right: 10px;
}

.classic-template .qr-placeholder {
    width: 40px;
    height: 40px;
    background: #000;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: bold;
}

/* Modern Template */
.modern-template {
    background: white;
    border: 2px dashed #000;
}

.modern-template .voucher-header {
    text-align: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px dashed #000;
}

.modern-template .voucher-header i {
    font-size: 1.5rem;
    margin-right: 10px;
}

.modern-template .code-section {
    text-align: center;
    margin-bottom: 15px;
}

.modern-template .duration {
    display: block;
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 5px;
}

.modern-template .code {
    font-size: 1rem;
    font-weight: bold;
}

.modern-template .wifi-info {
    margin-bottom: 15px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 4px;
}

.modern-template .wifi-info .field-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
    font-size: 0.9rem;
}

.modern-template .wifi-info .label {
    font-weight: bold;
}

.modern-template .instructions h4 {
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.modern-template .instructions ol {
    font-size: 0.8rem;
    margin-left: 15px;
}

.modern-template .disclaimer {
    text-align: center;
    font-size: 0.8rem;
    font-weight: bold;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed #000;
}

/* Premium Template */
.premium-template {
    background: white;
    border: 2px solid #000;
    position: relative;
}

.premium-template .voucher-header {
    background: #000;
    color: white;
    padding: 8px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: -15px -15px 15px -15px;
    border-radius: 6px 6px 0 0;
}

.premium-template .price {
    font-weight: bold;
}

.premium-template .credentials {
    margin-bottom: 15px;
}

.premium-template .field-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
    font-size: 0.9rem;
}

.premium-template .qr-section {
    position: absolute;
    top: 50px;
    right: 15px;
    text-align: center;
}

.premium-template .qr-placeholder {
    width: 50px;
    height: 50px;
    background: #000;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: bold;
    margin-bottom: 5px;
}

.premium-template .qr-label {
    font-size: 0.7rem;
    writing-mode: vertical-rl;
    text-orientation: mixed;
}

.premium-template .service-info {
    margin-top: 20px;
}

.premium-template .brand {
    font-weight: bold;
    font-size: 1rem;
    margin-bottom: 5px;
    background: linear-gradient(45deg, #ffd700, #ffed4e);
    padding: 5px 10px;
    border-radius: 4px;
    text-align: center;
}

.premium-template .website {
    font-size: 0.9rem;
    margin-bottom: 10px;
    text-align: center;
}

.premium-template .details {
    font-size: 0.8rem;
    margin-bottom: 10px;
}

.premium-template .details div {
    margin-bottom: 3px;
}

.premium-template .contact {
    font-size: 0.8rem;
    text-align: center;
}

/* Customization Panel */
.customization-panel {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

.customization-controls {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
}

.control-group {
    margin-bottom: 20px;
}

.control-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
}

.control-group input[type="text"],
.control-group input[type="url"],
.control-group input[type="color"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.control-group input[type="range"] {
    width: calc(100% - 50px);
    margin-right: 10px;
}

.preview-panel {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
}

.voucher-preview-container {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

/* Export Options */
.export-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.export-card {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.export-card:hover {
    border-color: #667eea;
    transform: translateY(-2px);
}

.export-card i {
    font-size: 2rem;
    color: #667eea;
    margin-bottom: 15px;
}

.export-card h3 {
    margin-bottom: 10px;
    color: #333;
}

.export-card p {
    color: #666;
    margin-bottom: 15px;
    font-size: 0.9rem;
}

/* Generated Vouchers */
.generated-vouchers {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.generated-voucher {
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .step {
        padding: 20px;
    }
    
    .template-grid {
        grid-template-columns: 1fr;
    }
    
    .customization-panel {
        grid-template-columns: 1fr;
    }
    
    .export-options {
        grid-template-columns: 1fr;
    }
    
    .generated-vouchers {
        grid-template-columns: 1fr;
    }
}

/* Print Styles */
@media print {
    body {
        background: white;
    }
    
    .container {
        max-width: none;
        padding: 0;
    }
    
    header {
        display: none;
    }
    
    .step-header {
        display: none;
    }
    
    .btn {
        display: none;
    }
    
    .voucher-preview {
        break-inside: avoid;
        margin-bottom: 20px;
        border: 2px solid #000;
    }
}
