/* App specific styles, overriding or extending the base styles.css */

.app-container {
    max-width: 1000px;
    margin: 100px auto 50px auto; /* padding top for fixed navbar */
    padding: 0 2rem;
    min-height: 60vh;
}

.app-header {
    text-align: center;
    margin-bottom: 3rem;
}

.app-header h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #1a1a1a;
}

.app-header p {
    color: #666;
    font-size: 1.1rem;
}

/* Tabs */
.app-tabs {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.tab-btn {
    padding: 12px 24px;
    background-color: #f0f0f0;
    border: none;
    border-radius: 30px;
    font-size: 1rem;
    font-weight: 600;
    font-family: 'Outfit', sans-serif;
    color: #333;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tab-btn:hover {
    background-color: #e0e0e0;
}

.tab-btn.active {
    background-color: #d11241; /* Assuming a primary brand color from original, using a strong color */
    color: white;
    box-shadow: 0 4px 10px rgba(209, 18, 65, 0.3);
}

/* Search Bar */
.search-container {
    position: relative;
    max-width: 600px;
    margin: 0 auto 3rem auto;
}

.search-container input {
    width: 100%;
    padding: 16px 20px 16px 50px;
    font-size: 1.1rem;
    border: 2px solid #ddd;
    border-radius: 50px;
    outline: none;
    transition: border-color 0.3s ease;
    font-family: 'Inter', sans-serif;
}

.search-container input:focus {
    border-color: #d11241;
}

.search-icon {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2rem;
    color: #888;
}

/* Results */
.results-container {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.05);
    padding: 2rem;
}

.loading, .no-results {
    text-align: center;
    padding: 3rem;
    color: #666;
    font-size: 1.1rem;
}

.hidden {
    display: none;
}

.results-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid #eee;
    transition: background-color 0.2s ease;
}

.result-item:last-child {
    border-bottom: none;
}

.result-item:hover {
    background-color: #f9f9f9;
}

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

.file-icon {
    font-size: 1.5rem;
}

.file-name {
    font-weight: 500;
    color: #333;
    font-size: 1.05rem;
    word-break: break-all;
}

.file-size {
    color: #888;
    font-size: 0.9rem;
    white-space: nowrap;
    margin-left: 15px;
}

.download-btn {
    padding: 8px 16px;
    background-color: #1a1a1a;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    font-size: 0.9rem;
    transition: background-color 0.3s ease;
    white-space: nowrap;
    margin-left: 20px;
}

.download-btn:hover {
    background-color: #333;
}

@media (max-width: 768px) {
    .result-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    .download-btn {
        margin-left: 40px; /* Align with text */
        align-self: flex-start;
}

/* App Cards Overrides (Light Theme) */
.app-container .grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2.5rem;
    padding: 1rem 0;
}
.app-container .card {
    background: #fff;
    border: 1px solid #eee;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}
.app-container .card:hover {
    border-color: #d11241;
}
.app-container .card-content h3 {
    color: #1a1a1a;
    font-size: 1.2rem;
}
.app-container .card-content p {
    color: #666;
    font-size: 0.95rem;
}
.app-container .card-content .file-size {
    color: #999;
    font-size: 0.85rem;
    margin-top: 5px;
}
.app-container .card-image {
    height: 200px;
    background-color: #f9f9f9;
    display: flex;
    justify-content: center;
    align-items: center;
}
.app-container .card-image img {
    max-width: 100px;
    height: auto;
    object-fit: contain;
}

/* Login Page Styles */
.login-page-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 80px);
    padding: 2rem;
    background-color: #f5f5f5;
}

.auth-box {
    background: #fff;
    padding: 3rem;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    width: 100%;
    max-width: 450px;
    text-align: center;
}

.auth-box h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: #1a1a1a;
}

.auth-box p {
    color: #666;
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #333;
}

.form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    transition: border-color 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: #d11241;
}

.full-width {
    width: 100%;
    padding: 14px;
    font-size: 1.1rem;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

.auth-mode-switch {
    margin-top: 1.5rem;
    color: #666;
}

.auth-mode-switch a {
    color: #d11241;
    text-decoration: none;
    font-weight: 600;
}

.divider {
    margin: 2rem 0;
    position: relative;
    border-top: 1px solid #eee;
}

.divider span {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: #fff;
    padding: 0 15px;
    color: #888;
    font-size: 0.9rem;
}

.btn-google {
    background-color: #fff;
    color: #333;
    border: 1px solid #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-google:hover {
    background-color: #f9f9f9;
}

.btn-google img {
    width: 20px;
    height: 20px;
}

.error-message {
    background-color: #ffebee;
    color: #c62828;
    padding: 10px;
    border-radius: 6px;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

#logoutBtn {
    margin-left: 20px;
    background-color: transparent;
    border: 1px solid #d11241;
    color: #d11241;
    padding: 8px 16px;
    border-radius: 30px;
    cursor: pointer;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    transition: all 0.3s;
}

#logoutBtn:hover {
    background-color: #d11241;
    color: white;
}
