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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #f5f5f5;
}

/* Landing Page */
.landing {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.landing-container {
    max-width: 500px;
    width: 90%;
}

.landing-content {
    background: white;
    border-radius: 20px;
    padding: 50px 40px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    text-align: center;
}

.logo h1 {
    font-size: 2.5em;
    color: #667eea;
    margin-bottom: 10px;
}

.tagline {
    color: #666;
    font-size: 1.1em;
    margin-bottom: 30px;
}

.features {
    display: flex;
    justify-content: space-around;
    margin: 30px 0;
}

.feature {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.feature .icon {
    font-size: 2em;
}

.feature span:last-child {
    font-size: 0.9em;
    color: #666;
}

.google-button {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: white;
    color: #444;
    padding: 14px 28px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    border: 2px solid #ddd;
    transition: all 0.3s;
    margin: 20px 0;
}

.google-button:hover {
    background: #f8f8f8;
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.disclaimer {
    color: #666;
    font-size: 0.9em;
    margin-top: 20px;
}

.disclaimer small {
    display: block;
    margin-top: 5px;
    font-size: 0.85em;
    color: #999;
}

/* Header */
header {
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header h1 {
    font-size: 1.8em;
    color: #667eea;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-email {
    color: #666;
    font-size: 0.9em;
}

.logout-btn {
    padding: 8px 16px;
    background: #f0f0f0;
    color: #666;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.3s;
}

.logout-btn:hover {
    background: #e0e0e0;
}

/* Main Container */
.container {
    max-width: 1400px;
    margin: 40px auto;
    padding: 0 20px;
}

.search-section {
    background: white;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.search-box label {
    display: block;
    font-weight: 600;
    margin-bottom: 10px;
    color: #333;
}

textarea {
    width: 100%;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1em;
    font-family: inherit;
    resize: vertical;
    transition: border-color 0.3s;
}

textarea:focus {
    outline: none;
    border-color: #667eea;
}

.filters {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 25px 0;
}

.filter-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
    font-size: 0.9em;
}

input[type="number"] {
    width: 100%;
    padding: 10px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1em;
    transition: border-color 0.3s;
}

input[type="number"]:focus {
    outline: none;
    border-color: #667eea;
}

.slider-container {
    display: flex;
    align-items: center;
    gap: 15px;
}

input[type="range"] {
    flex: 1;
}

#num-results-value {
    font-weight: bold;
    color: #667eea;
    font-size: 1.2em;
    min-width: 30px;
}

/* Buttons */
.primary-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

.primary-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.secondary-btn {
    padding: 10px 20px;
    background: white;
    color: #667eea;
    border: 2px solid #667eea;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.secondary-btn:hover {
    background: #667eea;
    color: white;
}

/* Loading */
.loading {
    text-align: center;
    padding: 60px 20px;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

/* Results */
.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 15px;
}

.results-header h2 {
    color: #333;
}

.results-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 25px;
}

.result-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: all 0.3s;
}

.result-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.result-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    background: #f0f0f0;
}

.result-info {
    padding: 20px;
}

.result-score {
    display: inline-block;
    padding: 6px 12px;
    background: #10b981;
    color: white;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: bold;
    margin-bottom: 10px;
}

.result-filename {
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
    word-break: break-all;
}

.result-folder {
    color: #666;
    font-size: 0.85em;
    margin-bottom: 5px;
}

.result-date {
    color: #999;
    font-size: 0.8em;
    margin-bottom: 10px;
}

.result-description {
    color: #555;
    font-size: 0.9em;
    line-height: 1.5;
    margin: 10px 0;
}

.result-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.result-actions a,
.result-actions button {
    flex: 1;
    text-align: center;
    padding: 8px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.85em;
    font-weight: 600;
    transition: all 0.3s;
}

.view-drive-btn {
    background: #667eea;
    color: white;
    border: none;
}

.view-drive-btn:hover {
    background: #5568d3;
}

/* Error */
.error-icon {
    font-size: 4em;
    margin-bottom: 20px;
}

.error-message {
    font-size: 1.2em;
    color: #666;
    margin: 20px 0;
}

.error-explanation {
    color: #999;
    margin-bottom: 30px;
}

/* Responsive */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 15px;
    }
    
    .filters {
        grid-template-columns: 1fr;
    }
    
    .results-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .results-grid {
        grid-template-columns: 1fr;
    }
}
/* Additional styles for Gemini modification features */
.modify-section {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e0e0e0;
}

.modify-input {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 0.95em;
    margin-bottom: 10px;
    font-family: inherit;
    min-height: 80px;
    resize: vertical;
}

.modify-input:focus {
    outline: none;
    border-color: #667eea;
}

.modify-btn {
    width: 100%;
    padding: 10px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.9em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.modify-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(102, 126, 234, 0.3);
}

.coming-soon-badge {
    display: inline-block;
    background: #f59e0b;
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75em;
    font-weight: 700;
    margin-left: 8px;
    vertical-align: middle;
}

.modified-result {
    margin-top: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    display: none;
}

.modified-result.active {
    display: block;
}

.modified-result img {
    width: 100%;
    border-radius: 6px;
    margin-bottom: 10px;
}

.modified-label {
    font-size: 0.85em;
    color: #667eea;
    font-weight: 600;
    margin-bottom: 5px;
}

.processing {
    text-align: center;
    padding: 20px;
    color: #667eea;
}

.spinner-small {
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 10px auto;
}
