:root {
    --primary-color: #3498db;
    --secondary-color: #2c3e50;
    --background-light: #ecf0f1;
    --card-background: #ffffff;
    --text-color: #34495e;
    --button-preview-bg: #e67e22;
    --button-save-bg: #27ae60;
    --button-hover: #2980b9;
    --border-color: #bdc3c7;
    --shadow-light: rgba(0, 0, 0, 0.1);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--background-light);
    color: var(--text-color);
    margin: 0;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.container {
    width: 100%;
    max-width: 600px;
    animation: fadeIn 1s ease-in-out;
}

.card {
    background-color: var(--card-background);
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 10px 25px var(--shadow-light);
    margin-bottom: 25px;
}

h2 {
    color: var(--primary-color);
    text-align: center;
    margin-top: 0;
    margin-bottom: 25px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: bold;
    margin-bottom: 8px;
}

input[type="text"], .select-wrapper select {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 1em;
    box-sizing: border-box;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

input[type="text"]:focus, .select-wrapper select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 5px rgba(52, 152, 219, 0.5);
}

.select-wrapper {
    position: relative;
    display: inline-block;
    width: 100%;
}

.select-wrapper select {
    appearance: none;
    background: #fff;
    cursor: pointer;
}

.select-wrapper::after {
    content: '▼';
    position: absolute;
    top: 50%;
    right: 15px;
    transform: translateY(-50%);
    font-size: 0.8em;
    pointer-events: none;
    color: var(--text-color);
}

.file-input {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px;
    width: 100%;
    box-sizing: border-box;
}

.button-group {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    margin-top: 25px;
}

.button {
    flex-grow: 1;
    padding: 15px;
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 1em;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.button-preview {
    background-color: var(--button-preview-bg);
}

.button-save {
    background-color: var(--button-save-bg);
}

.button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.message-error {
    color: #c0392b;
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    margin-bottom: 20px;
}

.preview-card {
    text-align: center;
}

.qr-preview-container {
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    display: inline-block;
    background-color: #ecf0f1;
}

.qr-preview-container img {
    max-width: 100%;
    height: auto;
    border: none;
    image-rendering: pixelated;
}

/* Style untuk kartu sukses */
.success-card {
    text-align: center;
}

.success-message {
    color: #27ae60;
    font-size: 1.2em;
    font-weight: bold;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-checkmark {
    font-size: 1.5em;
    margin-right: 10px;
}

.qr-result-container {
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    display: inline-block;
    background-color: #ecf0f1;
    margin-top: 20px;
    max-width: 50%;
}

.qr-result-container img {
    max-width: 100%;
    height: auto;
    border: none;
    image-rendering: pixelated;
}

.button-group-center {
    margin-top: 25px;
    text-align: center;
}

.button-home {
    background-color: var(--secondary-color);
    color: white;
    padding: 15px 30px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1em;
    transition: background-color 0.3s ease, transform 0.2s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.button-home:hover {
    background-color: #55606d;
    transform: translateY(-2px);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}