:root {
    --primary-color: #20c997;
    /* Minty Green */
    --primary-hover: #1aa179;
    --secondary-color: #4dabf7;
    /* Soft Blue */
    --secondary-hover: #3b8dbf;
    --bg-color: #f8f9fa;
    --text-color: #343a40;
    --text-light: #868e96;
    --card-bg: #ffffff;
    --border-radius: 16px;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    --font-family: 'Outfit', sans-serif;
}

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

body {
    font-family: var(--font-family);
    background-color: var(--bg-color);
    background-image: url('background.png');
    background-repeat: repeat;
    background-size: 400px;
    /* Adjust size as needed for the pattern */
    color: var(--text-color);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.container {
    width: 90%;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
    text-align: center;
}

/* Header */
.site-header {
    padding: 40px 0 20px;
    position: relative;
    /* Establish positioning context for full width */
}

.header-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    /* Removed position: relative to allow selector to position relative to site-header */
}

.language-selector {
    position: absolute;
    right: 20px;
    top: 20px;
}

.language-selector select {
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid #dee2e6;
    background: rgba(255, 255, 255, 0.8);
    font-family: var(--font-family);
    cursor: pointer;
    font-size: 0.9rem;
    outline: none;
}

.language-selector select:hover {
    border-color: var(--primary-color);
}

.site-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin: 0;
    background: #e6fcf5;
    padding: 15px 30px;
    border-radius: var(--border-radius);
    display: inline-block;
}

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    align-items: flex-start;
    /* Changed from center to start to keep it closer to top if needed, or we can keep center but reduce padding */
    justify-content: center;
    padding: 20px 0 40px;
    /* Reduced top padding */
}

.tool-card {
    background: var(--card-bg);
    padding: 50px;
    /* Increased padding */
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    width: 100%;
    max-width: 700px;
    /* Increased width */
    margin: 0 auto;
    transition: transform 0.3s ease;
}

.tool-card:hover {
    transform: translateY(-5px);
}

/* Input Group */
.input-group {
    margin-bottom: 30px;
}

#urlInput {
    width: 100%;
    padding: 20px 25px;
    /* Larger padding */
    font-size: 1.2rem;
    /* Larger font */
    border: 2px solid #e9ecef;
    border-radius: 16px;
    /* More rounded */
    outline: none;
    transition: border-color 0.3s;
    font-family: var(--font-family);
    text-align: center;
    /* Center text for better focus */
}

#urlInput:focus {
    border-color: var(--primary-color);
}

/* Buttons */
.action-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: var(--font-family);
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(32, 201, 151, 0.3);
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: white;
}

.btn-secondary:hover {
    background-color: var(--secondary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(77, 171, 247, 0.3);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    margin-top: 15px;
}

.btn-outline:hover {
    background: var(--primary-color);
    color: white;
}

.btn-small {
    padding: 8px 16px;
    font-size: 0.85rem;
    border: 1px solid #dee2e6;
    background: white;
    border-radius: 8px;
    cursor: pointer;
}

.btn-small:hover {
    background: #f1f3f5;
}

.btn-icon {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-light);
    transition: color 0.3s;
    padding: 5px;
}

.btn-icon:hover {
    color: var(--primary-color);
}

/* Options Panel */
.options-panel {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 12px;
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
    gap: 20px;
    align-items: center;
    animation: fadeIn 0.5s ease;
}

.option-group {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    color: var(--text-light);
}

select {
    padding: 5px 10px;
    border-radius: 6px;
    border: 1px solid #ced4da;
    font-family: var(--font-family);
}

/* Result Area */
.result-area {
    margin-top: 30px;
    border-top: 1px solid #e9ecef;
    padding-top: 30px;
    animation: slideDown 0.5s ease;
}

.qr-display {
    display: flex;
    justify-content: center;
    margin-bottom: 10px;
}

.qr-display img,
.qr-display canvas {
    border: 10px solid white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.short-url-box {
    background: #e9ecef;
    padding: 15px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    font-family: monospace;
    font-size: 1.1rem;
    color: var(--text-color);
}

.success-msg {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 10px;
}

/* Utilities */
.hidden {
    display: none !important;
}

.cta-section {
    margin-top: 40px;
}

.cta-link {
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 600;
    border-bottom: 2px solid transparent;
    transition: border-color 0.3s;
}

.cta-link:hover {
    border-color: var(--secondary-color);
}

/* Footer */
.site-footer {
    padding: 20px 0;
    color: var(--text-light);
    font-size: 0.9rem;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

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

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

/* Responsive */
@media (max-width: 600px) {
    .header-container {
        gap: 10px;
    }

    .language-selector {
        position: static;
        margin-bottom: 10px;
    }

    .action-buttons {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    .options-panel {
        flex-direction: column;
        gap: 10px;
    }
}