/* Global Styles */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
    text-align: center;
    padding: 30px;
    background: var(--bg);
    color: var(--text);
    transition: background 0.4s ease, color 0.4s ease;
}

:root {
    --bg: #f5f5f7;
    --text: #333;
    --card-bg: rgba(255, 255, 255, 0.7);
    --border: rgba(0, 0, 0, 0.1);
    --button-bg: #007aff;
    --button-hover: #005ecb;
    --shadow: rgba(0, 0, 0, 0.1);
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #1c1c1e;
        --text: #f5f5f7;
        --card-bg: rgba(30, 30, 32, 0.6);
        --border: rgba(255, 255, 255, 0.2);
        --button-bg: #0a84ff;
        --button-hover: #0066cc;
        --shadow: rgba(0, 0, 0, 0.4);
    }
}

h1 {
    font-weight: 600;
    font-size: 28px;
}

/* Glassmorphism Card */
.container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.output {
    margin-top: 20px;
    padding: 20px;
    border-radius: 12px;
    backdrop-filter: blur(12px);
    background: var(--card-bg);
    width: 350px;
    text-align: left;
    border: 1px solid var(--border);
    box-shadow: 0 4px 15px var(--shadow);
    transition: transform 0.3s ease, opacity 0.3s ease;
    opacity: 1; /* Set initial opacity to 1 */
    transform: translateY(0); /* Set initial transform to 0 */
}

.output.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Dropdowns */
.dropdowns {
    display: flex;
    gap: 15px;
}

select {
    padding: 10px;
    font-size: 16px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--card-bg);
    color: var(--text);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

select:hover {
    border-color: var(--button-bg);
}

/* Buttons */
.random-button {
    margin-top: 15px;
    padding: 12px 20px;
    font-size: 16px;
    cursor: pointer;
    background-color: var(--button-bg);
    color: white;
    border: none;
    border-radius: 10px;
    transition: all 0.3s ease;
    font-weight: 500;
    box-shadow: 0 4px 10px var(--shadow);
    display: flex;
    align-items: center;
    gap: 8px;
}

.random-button:hover {
    background-color: var(--button-hover);
    box-shadow: 0 6px 15px var(--shadow);
}

/* SF Symbols - Apple-Like Icons */
.icon {
    width: 20px;
    height: 20px;
    fill: white;
}

/* Image Animation */
.product-image {
    margin-top: 15px;
    width: 100%;
    max-width: 250px;
    border-radius: 12px;
    display: none;
    transition: opacity 0.5s ease, transform 0.5s ease;
    opacity: 0;
    transform: scale(0.95);
}

.fade-in {
    opacity: 1 !important;
    transform: translateY(0) !important;
}

.image-fade-in {
    opacity: 1 !important;
    transform: scale(1) !important;
}

.badge {
    display: inline-block;
    padding: 0.25em 0.4em;
    font-size: 75%;
    font-weight: 700;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: 0.25rem;
    margin-left: 0.5em;
}

.badge.real {
    background-color: #28a745;
    color: white;
}

.badge.theoretical {
    background-color: #6c757d;
    color: white;
}