body {
    font-family: 'Inter', sans-serif;
    background-color: #f0f2f5;
    color: #2c2c2c;
    margin: 0;
    padding: 20px;
}

.main-container {
    max-width: 800px;
    margin: 60px auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* HEADER */
.search-focus-container {
    width: 100%;
    text-align: center;
    margin-bottom: 30px;
}

.header-title {
    font-size: 3em;
    font-weight: 700;
    margin-bottom: 10px;
    letter-spacing: -1px;
}

.highlight {
    color: #007aff;
}

.header-subtitle {
    font-size: 1.2em;
    color: #666;
    margin-bottom: 40px;
}

/* SEARCH INPUT */
.main-prompt-area {
    display: flex;
    gap: 10px;
    justify-content: center;
    background: white;
    padding: 10px;
    border-radius: 50px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    border: 1px solid #e0e0e0;
}

#user-topic {
    width: 60%;
    padding: 15px 20px;
    font-size: 1.1em;
    border: none;
    outline: none;
    border-radius: 50px;
}

#search-button {
    padding: 15px 30px;
    font-size: 1em;
    font-weight: 600;
    background-color: #007aff;
    color: white;
    border: none;
    border-radius: 40px;
    cursor: pointer;
    transition: background 0.2s;
}

#search-button:hover {
    background-color: #005bb5;
}

/* RESULTS CONTAINER */
.results-container {
    width: 100%;
    animation: fadeIn 0.5s ease;
}

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

/* SENPAI NOTE (The "Note" feature) */
.senpai-note {
    background-color: #fff8e1; /* Post-it yellow look */
    border-left: 5px solid #ffc107;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
    font-size: 1.05em;
    color: #444;
    line-height: 1.6;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.section-title {
    font-size: 1.5em;
    margin-bottom: 20px;
    font-weight: 600;
}

/* RESOURCE CARDS */
.cards-grid {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.resource-card {
    background: white;
    border: 1px solid #eee;
    border-radius: 12px;
    padding: 20px;
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
}

.resource-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.platform-tag {
    font-size: 0.8em;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #888;
    font-weight: 600;
}

.resource-link {
    text-decoration: none;
    color: #333;
}

.resource-title {
    margin: 5px 0;
    font-size: 1.2em;
    color: #007aff;
    font-weight: 600;
}

/* THE "+" BUTTON */
.toggle-btn {
    background: #f0f2f5;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    font-size: 1.2em;
    cursor: pointer;
    color: #555;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s;
}

.toggle-btn:hover {
    background: #e1e4e8;
    color: #000;
}

/* HIDDEN DESCRIPTION */
.card-description {
    display: none; /* Hidden by default */
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #eee;
    font-size: 0.95em;
    color: #555;
    line-height: 1.5;
}

.card-description.active {
    display: block;
    animation: slideDown 0.3s ease;
}

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

/* STORIES SECTION */
.stories-section {
    margin-top: 50px;
    padding-top: 30px;
    border-top: 2px dashed #e0e0e0;
}

.story-card {
    background: #2c3e50;
    color: white;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 10px;
}

.story-title {
    margin: 0 0 10px 0;
    font-size: 1.1em;
    color: #ffd700; /* Gold */
}

/* SPINNER */
.spinner {
    display: none;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #007aff;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

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


/* --- MODERN DROPDOWN STYLING --- */

.filter-section {
    display: flex;
    justify-content: flex-end; /* Align to the right side */
    align-items: center;
    gap: 12px; /* Space between label and box */
    margin: 20px 0;
    font-family: 'Inter', sans-serif;
}

.filter-section label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #64748b; /* Cool grey text */
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

#platform-select {
    /* 1. Reset Default Browser Styles */
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    
    /* 2. Box Styling */
    background-color: #ffffff;
    border: 2px solid #e2e8f0;
    border-radius: 12px; /* Smooth rounded corners */
    padding: 10px 40px 10px 16px; /* Right padding creates space for the arrow */
    font-size: 1rem;
    font-weight: 500;
    color: #334155;
    cursor: pointer;
    outline: none;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05); /* Subtle shadow */
    
    /* 3. Custom Arrow Icon (Blue Chevron) */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23007aff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    
    /* 4. Smooth Animation */
    transition: all 0.2s ease-in-out;
}

/* Hover Effect */
#platform-select:hover {
    border-color: #007aff; /* Turns blue */
    transform: translateY(-1px); /* Moves up slightly */
    box-shadow: 0 10px 15px -3px rgba(0, 122, 255, 0.1);
}

/* Focus Effect (When clicked) */
#platform-select:focus {
    border-color: #007aff;
    box-shadow: 0 0 0 4px rgba(0, 122, 255, 0.1); /* Blue glow ring */
}

.platform-tag {
    font-size: 0.7rem;
    font-weight: 800;
    padding: 4px 8px;
    border-radius: 4px;
    margin-bottom: 5px;
    display: inline-block;
}

/* Color coding the tags */
.platform-tag.youtube { background: #fee2e2; color: #dc2626; } /* Red */
.platform-tag.documentation { background: #e0e7ff; color: #4338ca; } /* Indigo */
.platform-tag.course { background: #dcfce7; color: #166534; } /* Green */