:root {
    --bg-dark: #f8f9fa; /* Google gray-50 */
    --text-primary: #202124; /* Google dark gray */
    --text-secondary: #5f6368; /* Google medium gray */
    --accent-glow: rgba(66, 133, 244, 0.2); 
    --glass-bg: #ffffff;
    --glass-border: #dadce0; /* Google border gray */
    
    --brand-primary: #4285f4; /* Google Blue */
    --brand-primary-hover: #1a73e8;
    --brand-secondary: #ea4335; /* Google Red */
    --brand-gradient: linear-gradient(135deg, #4285f4 0%, #34a853 100%); /* Blue to Green */
}

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

body {
    font-family: 'Open Sans', 'Roboto', 'Arial', sans-serif;
    color: var(--text-primary);
    background-color: var(--bg-dark);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    position: relative;
}

/* Background Animated Blobs */
.background-elements {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.5;
    animation: float 20s infinite ease-in-out alternate;
}

.blob1 {
    top: -10%;
    left: -10%;
    width: 500px;
    height: 500px;
    background: #4285f4; /* Google Blue */
    animation-delay: 0s;
}

.blob2 {
    bottom: -20%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: #ea4335; /* Google Red */
    animation-delay: -5s;
}

.blob3 {
    top: 30%;
    right: 30%;
    width: 400px;
    height: 400px;
    background: #fbbc04; /* Google Yellow */
    animation-delay: -3s;
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(50px, 50px) scale(1.1); }
}

/* Container */
.container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 650px;
    padding: 3rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    animation: fadeUp 0.8s ease-out;
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.glass-panel {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05), 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Header */
header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
}

header h1 span {
    background: var(--brand-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

header p {
    color: var(--text-secondary);
    font-size: 1.05rem;
    line-height: 1.5;
}

/* Controls */
.controls {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.input-group label {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.select-wrapper {
    position: relative;
}

select {
    width: 100%;
    padding: 0.8rem 1.2rem;
    appearance: none;
    background: #ffffff;
    border: 1px solid var(--glass-border);
    border-radius: 4px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

select:focus {
    outline: none;
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

select option {
    background: #ffffff;
}

.select-wrapper::after {
    content: "▼";
    font-size: 0.8rem;
    color: var(--text-secondary);
    position: absolute;
    right: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
}

/* Buttons */
.btn-group {
    display: flex;
    gap: 0.8rem;
    margin-top: 0.5rem;
}

.btn {
    font-family: inherit;
    font-weight: 500;
    padding: 0.75rem 1.5rem;
    border-radius: 4px; /* Google prefers slight curves, not pills for main buttons */
    border: none;
    cursor: pointer;
    font-size: 0.95rem;
    transition: background 0.2s, box-shadow 0.2s;
    flex: 1;
    text-transform: capitalize;
}

.primary-btn {
    background: var(--brand-primary);
    color: white;
    box-shadow: 0 1px 2px 0 rgba(60,64,67,0.3), 0 1px 3px 1px rgba(60,64,67,0.15);
}

.primary-btn:hover {
    background: var(--brand-primary-hover);
    box-shadow: 0 1px 3px 0 rgba(60,64,67,0.3), 0 4px 8px 3px rgba(60,64,67,0.15);
}

.primary-btn:active {
    background: #174ea6; /* Darker blue */
}

.secondary-btn {
    background: #ffffff;
    color: var(--brand-primary);
    border: 1px solid var(--glass-border);
}

.secondary-btn:hover {
    background: #f8f9fa;
    border-color: #dadce0;
}

.ghost-btn {
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
    margin: 0 auto;
    display: block;
    border-radius: 4px;
}

.ghost-btn:hover {
    background: #f1f3f4;
    color: var(--text-primary);
}

/* Results Area */
.results-area {
    min-height: 150px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #ffffff;
    border-radius: 8px;
    padding: 2rem;
    border: 1px solid var(--glass-border);
    position: relative;
    overflow: hidden;
}

.hidden {
    display: none !important;
}

/* Loader */
.loader {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255,255,255,0.1);
    border-radius: 50%;
    border-top-color: var(--brand-primary);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Single Result */
.result-container {
    text-align: center;
    animation: scaleIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    width: 100%;
}

@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

.name-display h2 {
    font-size: 3rem;
    font-weight: 500; /* Google uses lighter weights for huge text */
    letter-spacing: -0.01em;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    word-break: break-all;
}

.description {
    color: var(--text-secondary);
    font-size: 1.1rem;
    font-style: italic;
    margin-bottom: 1.5rem;
}

.badges {
    display: flex;
    justify-content: center;
    gap: 0.8rem;
}

.badge {
    padding: 0.3rem 0.8rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
    background: #f1f3f4; /* Google light badge */
    color: var(--text-primary);
    border: 1px solid var(--glass-border);
    text-transform: capitalize;
}

/* List Results */
.list-container {
    width: 100%;
    animation: fadeIn 0.4s ease;
    max-height: 250px;
    overflow-y: auto;
    padding-right: 0.5rem;
}

/* Custom Scrollbar */
.list-container::-webkit-scrollbar {
    width: 8px;
}
.list-container::-webkit-scrollbar-track {
    background: #f1f3f4;
    border-radius: 4px;
}
.list-container::-webkit-scrollbar-thumb {
    background: #dadce0;
    border-radius: 4px;
}
.list-container::-webkit-scrollbar-thumb:hover {
    background: #bdc1c6;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.results-count {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    text-align: center;
}

.results-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.results-list li {
    background: #ffffff;
    border: 1px solid var(--glass-border);
    padding: 1rem;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: box-shadow 0.2s, background 0.2s;
}

.results-list li:hover {
    background: #f8f9fa;
    box-shadow: 0 1px 2px 0 rgba(60,64,67,0.3), 0 1px 3px 1px rgba(60,64,67,0.15);
}

.list-name {
    font-weight: 600;
    font-size: 1.2rem;
    color: var(--text-primary);
}

.list-desc {
    font-size: 0.8rem;
    color: var(--text-secondary);
    display: block;
    margin-top: 0.2rem;
}

.list-badges {
    display: flex;
    gap: 0.5rem;
}

.list-badge {
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    background: #e8f0fe; /* Google light blue background */
    color: #1967d2; /* Google dark blue text */
    border: none;
}

.error-container {
    color: #ef4444;
    text-align: center;
    font-weight: 500;
}
