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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    /* Animated Deep Oceanic Blue Gradient */
    background: linear-gradient(-45deg, #0F2027, #203A43, #2C5364, #243B55);
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
    min-height: 100vh;
    color: #333;
}

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

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 40px;
    color: white;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

header p {
    font-size: 1.2rem;
    opacity: 0.9;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

header a {
    color: #a8d5e2;
    /* Light blue accent */
    text-decoration: none;
    font-weight: 500;
}

header a:hover {
    text-decoration: underline;
    color: #fff;
}

main {
    display: grid;
    gap: 30px;
    grid-template-columns: 1fr;
}

/* Glassmorphism Card Style */
section,
.login-container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

section:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
}

section h2 {
    color: #2c5364;
    margin-bottom: 20px;
    font-size: 1.5rem;
    border-bottom: 3px solid #203a43;
    padding-bottom: 10px;
}

.input-group {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

input[type="text"],
input[type="url"],
input[type="password"],
select,
.form-input {
    flex: 1;
    min-width: 250px;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    background: #f8fafc;
}

input[type="text"]:focus,
input[type="url"]:focus,
input[type="password"]:focus,
select:focus,
.form-input:focus {
    outline: none;
    border-color: #2c5364;
    box-shadow: 0 0 0 3px rgba(44, 83, 100, 0.2);
    background: white;
}

/* General Button Style */
button {
    padding: 12px 24px;
    background: linear-gradient(135deg, #203A43 0%, #2C5364 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(32, 58, 67, 0.4);
}

button:active {
    transform: translateY(0);
}

/* Google Style Button (Specific Class) */
.google-btn {
    width: 100%;
    padding: 12px;
    background: white !important;
    /* Force white background */
    color: #3c4043 !important;
    border: 1px solid #dadce0 !important;
    border-radius: 20px !important;
    /* Pill shape commonly used */
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: background-color 0.2s, box-shadow 0.2s, border-color 0.2s;
    font-family: 'Roboto', sans-serif;
    transform: none !important;
    /* Reset transform for this specific button style */
}

.google-btn:hover {
    background: #f8faff !important;
    box-shadow: 0 1px 3px rgba(60, 64, 67, 0.3) !important;
    border-color: #d2e3fc !important;
    color: #202124 !important;
    transform: translateY(-1px) !important;
}

.google-btn img {
    width: 20px;
    height: 20px;
    display: block;
}

.result-section {
    margin-top: 20px;
    padding: 20px;
    background: #f8fafc;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
}

.result-section h3 {
    color: #4a5568;
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.result-box {
    display: flex;
    gap: 10px;
    align-items: center;
}

.result-box input {
    flex: 1;
    background: white;
    border: 1px solid #cbd5e0;
}

.copy-btn,
.download-btn {
    background: #48bb78;
    padding: 10px 16px;
    font-size: 14px;
}

.copy-btn:hover,
.download-btn:hover {
    background: #38a169;
}

.download-btn {
    background: #ed8936;
}

.download-btn:hover {
    background: #dd6b20;
}

.barcode-container {
    text-align: center;
}

#barcodeCanvas,
#combinedBarcodeCanvas {
    max-width: 100%;
    height: auto;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    margin-bottom: 15px;
    background: white;
}

.barcode-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.combined-results {
    display: grid;
    gap: 20px;
    grid-template-columns: 1fr 1fr;
}

.combined-results .barcode-result {
    text-align: center;
}

select {
    min-width: 150px;
    background: white;
    cursor: pointer;
}

/* QR Code Customization Panel */
.customization-panel {
    margin: 20px 0;
    padding: 20px;
    background: #f0f4f8;
    border-radius: 10px;
    border: 1px solid #cbd5e0;
}

.customization-panel h3 {
    color: #2c5364;
    margin-bottom: 15px;
    font-size: 1.1rem;
    border-bottom: 2px solid #203a43;
    padding-bottom: 8px;
}

.custom-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.option-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.option-group label {
    font-weight: 600;
    color: #4a5568;
    font-size: 14px;
}

.option-group input[type="color"] {
    width: 60px;
    height: 40px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    padding: 0;
}

.option-group input[type="color"]:hover {
    border-color: #2c5364;
}

.option-group select {
    min-width: auto;
    width: 100%;
}

footer {
    text-align: center;
    margin-top: 40px;
    color: white;
    opacity: 0.8;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }

    header h1 {
        font-size: 2rem;
    }

    .input-group {
        flex-direction: column;
    }

    input[type="text"],
    input[type="url"],
    select {
        min-width: 100%;
    }

    .result-box {
        flex-direction: column;
    }

    .combined-results {
        grid-template-columns: 1fr;
    }

    .barcode-actions {
        flex-direction: column;
        align-items: center;
    }

    button {
        width: 100%;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.8rem;
    }

    section {
        padding: 20px;
    }

    .barcode-actions button {
        width: 100%;
    }
}

/* Animation for success messages */
.success-message {
    background: #48bb78;
    color: white;
    padding: 10px 15px;
    border-radius: 5px;
    margin: 10px 0;
    text-align: center;
    animation: slideIn 0.3s ease;
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.success-message.error {
    background: #e53e3e;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Loading state */
.loading {
    opacity: 0.7;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #2c5364;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}