/* assets/css/style.css */
/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif; /* Gunakan font dari Google Fonts */
    background: linear-gradient(135deg, #f5f7fa 0%, #e4edf5 100%); /* Gradient background */
    color: #2c3e50;
    min-height: 100vh;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.container {
    width: 100%;
    max-width: 1200px; /* Lebih lebar untuk tampilan modern */
    background-color: #ffffff;
    border-radius: 20px; /* Border radius besar */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08); /* Shadow lembut */
    overflow: hidden; /* Untuk border radius di header/footer */
    display: flex;
    flex-direction: column;
}

/* Header */
.header {
    background: linear-gradient(90deg, #6a11cb 0%, #2575fc 100%); /* Gradient header */
    color: white;
    padding: 30px 40px;
    text-align: center;
}

.title {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.subtitle {
    font-size: 1.1rem;
    font-weight: 300;
    opacity: 0.9;
}

/* Main Content */
.main-content {
    padding: 40px;
    flex-grow: 1;
}

.generator-form {
    background-color: #f9fafb;
    padding: 30px;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
    margin-bottom: 40px;
}

.form-group {
    margin-bottom: 25px;
}

.form-label {
    display: block;
    font-weight: 600;
    color: #34495e;
    margin-bottom: 10px;
    font-size: 1rem;
}

.form-input {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    background-color: #ffffff;
}

.form-input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}

.radio-group {
    display: flex;
    gap: 20px;
    flex-wrap: wrap; /* Jika layar sempit */
}

.radio-option {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 10px 15px;
    border-radius: 10px;
    background-color: #edf2f7;
    transition: background-color 0.2s ease, transform 0.1s ease;
}

.radio-option:hover {
    background-color: #e2e8f0;
    transform: translateY(-2px);
}

.radio-input {
    margin-right: 8px;
    cursor: pointer;
}

.radio-label {
    font-weight: 500;
    color: #4a5568;
    cursor: pointer;
}

.submit-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(90deg, #3498db 0%, #2c3e50 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 10px rgba(52, 152, 219, 0.3);
}

.submit-btn:hover {
    background: linear-gradient(90deg, #2980b9 0%, #1a2530 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(52, 152, 219, 0.4);
}

.submit-btn:active {
    transform: translateY(0);
}

/* Alerts */
.alert {
    padding: 15px 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-weight: 500;
}

.alert-error {
    background-color: #ffebee;
    color: #c62828;
    border-left: 4px solid #c62828;
}

/* Results */
.results-section {
    margin-top: 30px;
}

.results-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 20px;
    text-align: center;
}

.barcodes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); /* Grid fleksibel */
    gap: 25px;
    justify-items: center;
}

.barcode-card {
    background-color: #ffffff;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    width: 100%;
    max-width: 240px; /* Batasi lebar maksimal card */
    display: flex;
    flex-direction: column;
}

.barcode-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
}

.barcode-container {
    padding: 20px;
    background-color: #f8fafc;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 200px; /* Tinggi minimum untuk konsistensi */
}

.barcode-image {
    max-width: 100%;
    height: auto;
    object-fit: contain; /* Pastikan gambar proporsional */
}

.barcode-info {
    padding: 15px 20px;
    background-color: #f1f5f9;
    border-top: 1px solid #e2e8f0;
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.barcode-data {
    font-size: 0.9rem;
    font-weight: 500;
    color: #4a5568;
    word-break: break-all; /* Pisah teks panjang */
    text-align: center;
}

.download-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px; /* Jarak antar ikon dan teks */
    padding: 10px 15px;
    background-color: #3498db;
    color: white;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: background-color 0.2s ease;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.download-btn:hover {
    background-color: #2980b9;
}

/* Footer */
.footer {
    background-color: #2c3e50;
    color: #ecf0f1;
    text-align: center;
    padding: 20px;
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        margin: 10px;
        border-radius: 15px;
    }
    .header {
        padding: 25px 20px;
    }
    .title {
        font-size: 1.8rem;
    }
    .main-content {
        padding: 25px 20px;
    }
    .generator-form {
        padding: 20px;
    }
    .radio-group {
        flex-direction: column;
        gap: 12px;
    }
    .radio-option {
        justify-content: center;
    }
    .barcodes-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); /* Lebih kecil di mobile */
        gap: 20px;
    }
    .barcode-card {
        max-width: 100%; /* Lebih lebar di mobile */
    }
}