:root {
    --bg-color: #0f172a; /* Dark Slate Background */
    --card-bg: rgba(30, 41, 59, 0.6);
    --card-border: rgba(255, 255, 255, 0.08);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --accent: #f59e0b; /* Beer amber/gold */
    --accent-hover: #fbbf24;
    --input-bg: rgba(15, 23, 42, 0.8);
    --input-border: rgba(255, 255, 255, 0.15);
}

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

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    /* Optional: add a subtle mesh gradient background */
    background-image: 
        radial-gradient(at 0% 0%, hsla(38,100%,50%,0.07) 0px, transparent 50%),
        radial-gradient(at 100% 0%, hsla(215,100%,50%,0.05) 0px, transparent 50%);
    background-attachment: fixed;
}

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

/* Header */
.header {
    padding: 40px 0 20px;
    text-align: center;
    border-bottom: 1px solid var(--card-border);
    margin-bottom: 40px;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(10px);
}

.header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.header h1 span {
    color: var(--accent);
}

.header p {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-top: 5px;
}

/* Main Layout */
.converter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 60px;
}

/* Cards (Glassmorphism) */
.card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 25px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.7);
    border-color: rgba(245, 158, 11, 0.3);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
    border-bottom: 1px solid var(--card-border);
    padding-bottom: 15px;
}

.card-header .icon {
    font-size: 1.8rem;
    background: rgba(245, 158, 11, 0.1);
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
}

.card-header h2 {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--text-main);
}

.card-body {
    display: flex;
    flex-direction: column;
    gap: 15px;
    flex-grow: 1;
}

/* Inputs */
.input-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.input-group label {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 500;
    transition: color 0.2s;
}

.input-group input {
    width: 100%;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 8px;
    padding: 12px 16px;
    color: var(--text-main);
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.2s ease;
    outline: none;
}

.input-group input::placeholder {
    color: rgba(148, 163, 184, 0.3);
}

.input-group input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.15);
}

.input-group:focus-within label {
    color: var(--accent);
}

/* Hide arrow for number inputs */
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
input[type=number] {
    -moz-appearance: textfield;
    appearance: textfield;
}

/* Color Preview */
.color-preview {
    margin-top: 20px;
    height: 60px;
    border-radius: 8px;
    background-color: #f8fafc; /* Default empty state */
    border: 1px solid var(--card-border);
    transition: background-color 0.4s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    text-shadow: 0px 1px 2px rgba(0,0,0,0.5);
    color: white;
}

/* Footer */
footer {
    margin-top: auto;
    padding: 30px 0;
    text-align: center;
    border-top: 1px solid var(--card-border);
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 768px) {
    .header h1 {
        font-size: 2rem;
    }
    .converter-grid {
        grid-template-columns: 1fr;
    }
}

/* Links Section */
.links-section {
    margin-top: 20px;
    padding-top: 40px;
    border-top: 1px solid var(--card-border);
}

.section-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 25px;
    text-align: left;
    color: var(--text-main);
}

.links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.link-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 20px 25px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-decoration: none;
    color: var(--text-main);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.link-card:hover {
    transform: translateY(-4px);
    border-color: rgba(245, 158, 11, 0.5);
    background: rgba(30, 41, 59, 0.8);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
}

.link-info {
    display: grid;
    grid-template-columns: auto 1fr;
    row-gap: 4px;
    column-gap: 15px;
    align-items: center;
}

.link-info .icon {
    grid-row: span 2;
    font-size: 1.8rem;
    background: rgba(245, 158, 11, 0.1);
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
}

.link-title {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text-main);
    transition: color 0.3s ease;
}

.link-card:hover .link-title {
    color: var(--accent);
}

.link-url {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.icon-arrow {
    stroke: var(--text-muted);
    transition: transform 0.3s ease, stroke 0.3s ease;
}

.link-card:hover .icon-arrow {
    transform: translateX(5px);
    stroke: var(--accent);
}
