:root {
    /* Light Theme (Default) */
    --primary: #6C5B7B;
    --secondary: #C06C84;
    --accent: #F8B195;
    --background: #F5F5F5;
    --text: #333333;
    --highlight: #355C7D;
    --white: #FFFFFF;
    --shadow: rgba(0, 0, 0, 0.1);
    --card-bg: #FFFFFF;
    --border: #E0E0E0;
    --nav-height: 60px;
    --bottom-nav-height: 60px;
}

[data-theme="dark"] {
    --primary: #9B8AA6;
    --secondary: #E291A8;
    --accent: #FFCDB2;
    --background: #1A1A1A;
    --text: #E0E0E0;
    --highlight: #4B7BA3;
    --white: #2A2A2A;
    --shadow: rgba(0, 0, 0, 0.3);
    --card-bg: #2A2A2A;
    --border: #404040;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Arial', sans-serif;
}

body {
    background-color: var(--background);
    color: var(--text);
    line-height: 1.6;
    padding-top: var(--nav-height);
    padding-bottom: var(--bottom-nav-height);
}

/* New Navigation Styles */
.top-navbar {
    background-color: var(--white);
    padding: 0.8rem 1.5rem;
    box-shadow: 0 2px 4px var(--shadow);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: var(--nav-height);
}

.logo {
    display: flex;
    align-items: center;
}

.logo-img {
    height: 40px;
    width: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary);
}

/* Search Styles */
.search-wrapper {
    display: flex;
    align-items: center;
    position: relative;
}

.search-container {
    background: var(--background);
    border-radius: 20px;
    overflow: hidden;
    width: 0;
    transition: all 0.3s ease;
    position: absolute;
    right: 60px;
    display: flex;
    align-items: center;
}

.search-container.active {
    width: 250px;
    padding-right: 40px;
}

.search-container input {
    border: none;
    background: none;
    padding: 0.5rem 1rem;
    width: 100%;
    color: var(--text);
    font-size: 0.9rem;
}

.search-container input:focus {
    outline: none;
}

.search-toggle {
    background: none;
    border: none;
    color: var(--primary);
    min-width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    position: relative;
    z-index: 2;
}

.search-toggle:hover {
    color: var(--highlight);
}

.search-toggle.active {
    color: var(--highlight);
}

/* Media queries for search responsiveness */
@media (max-width: 768px) {
    .search-wrapper {
        order: 2;
    }

    .search-container {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        width: 0;
        height: var(--nav-height);
        border-radius: 0;
        z-index: 1001;
        background: var(--white);
        padding-right: 60px;
        opacity: 0;
        visibility: hidden;
    }

    .search-container.active {
        width: 100%;
        opacity: 1;
        visibility: visible;
    }

    .search-container input {
        height: 100%;
        padding: 0 1rem;
        font-size: 1rem;
    }

    .search-toggle {
        position: relative;
        right: 0;
        color: var(--primary);
        background: none;
    }

    .search-toggle.active {
        position: fixed;
        right: 1rem;
        z-index: 1002;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .search-container.active {
        width: 200px;
    }
}

@media (min-width: 1025px) {
    .search-container {
        position: relative;
        right: 0;
        width: 250px;
        opacity: 1;
        visibility: visible;
        border: 1px solid var(--border);
    }

    .search-container input {
        background: var(--background);
    }

    .search-toggle {
        background: var(--background);
    }
}

/* Bottom Navigation */
.bottom-navbar {
    background-color: var(--white);
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    display: flex;
    justify-content: space-evenly;
    align-items: center;
    height: var(--bottom-nav-height);
    box-shadow: 0 -1px 10px rgba(108, 91, 123, 0.1); /* Using primary color for subtle shadow */
    padding: 0 16px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid rgba(108, 91, 123, 0.1);
}

.nav-item {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text);
    text-decoration: none;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    margin: 0 4px;
}

.nav-item i {
    font-size: 1.25rem;
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-item::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    background-color: var(--primary);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 50%;
    opacity: 0;
}

.nav-item:hover::after,
.nav-item.active::after {
    width: 4px;
    opacity: 1;
}

.nav-item:hover {
    color: var(--primary);
    background-color: rgba(108, 91, 123, 0.08); /* Using primary color with transparency */
}

.nav-item:hover i {
    transform: translateY(-2px);
}

.nav-item.active {
    color: var(--primary);
    background-color: rgba(108, 91, 123, 0.12); /* Slightly darker for active state */
}

.nav-item.active i {
    transform: translateY(-2px);
}

/* Responsive Adjustments */
@media (min-width: 768px) {
    .nav-item {
        width: 52px;
        height: 52px;
    }

    .nav-item i {
        font-size: 1.35rem;
    }
}

/* Dashboard Layout */
.dashboard {
    max-width: 1200px;
    margin: 1rem auto;
    padding: 0 1rem;
    display: grid;
    gap: 1rem;
    grid-template-columns: 1fr;
}

/* Section Styles */
section {
    background: var(--card-bg);
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 4px 6px var(--shadow);
    border: 1px solid var(--border);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

section:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px var(--shadow);
}

h2 {
    color: var(--primary);
    margin-bottom: 1.2rem;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.content-box {
    background: var(--background);
    padding: 1.2rem;
    border-radius: 10px;
    min-height: 120px;
    transition: all 0.3s ease;
}

/* Zodiac Selector */
.zodiac-selector select {
    width: 100%;
    padding: 0.8rem;
    margin-bottom: 1.2rem;
    border: 2px solid var(--primary);
    border-radius: 10px;
    color: var(--text);
    background-color: var(--card-bg);
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' 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 1rem center;
    background-size: 1em;
}

.zodiac-selector select:focus {
    outline: none;
    border-color: var(--highlight);
    box-shadow: 0 0 0 3px rgba(53, 92, 125, 0.2);
}

/* Quick Actions Grid */
.action-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.action-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.2rem;
    background: var(--highlight);
    color: var(--white);
    text-decoration: none;
    border-radius: 15px;
    transition: all 0.3s ease;
    text-align: center;
    min-height: 120px;
    gap: 0.8rem;
}

.action-card:hover {
    transform: translateY(-3px);
    background: var(--primary);
    box-shadow: 0 4px 12px var(--shadow);
}

.action-card i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.action-card span {
    font-weight: 500;
    font-size: 0.9rem;
    line-height: 1.2;
}

/* News Grid */
.news-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.news-card {
    background: var(--card-bg);
    border-radius: 10px;
    padding: 1.2rem;
    border: 1px solid var(--border);
    transition: all 0.3s ease;
}

.news-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--shadow);
}

.news-card h3 {
    color: var(--primary);
    font-size: 1.1rem;
    margin-bottom: 0.8rem;
}

.news-card p {
    color: var(--text);
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Placeholder Content */
.placeholder-content {
    color: var(--text);
    text-align: center;
    padding: 2rem;
    font-style: italic;
}

.tip-content {
    color: var(--text);
    text-align: center;
    padding: 1rem;
    font-style: italic;
}

/* Loading Animation */
@keyframes shimmer {
    0% { background-position: -1000px 0; }
    100% { background-position: 1000px 0; }
}

.loading {
    background: linear-gradient(90deg, 
        var(--background) 0%, 
        var(--card-bg) 50%, 
        var(--background) 100%);
    background-size: 1000px 100%;
    animation: shimmer 2s infinite linear;
}

/* Welcome Section */
.welcome-section {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: var(--white);
    padding: 3rem 2rem;
    text-align: center;
    border-radius: 20px;
    margin-bottom: 2rem;
}

.welcome-section h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.welcome-section p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    font-size: 1.1rem;
    font-weight: 500;
    text-decoration: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px var(--shadow);
}

.btn i {
    font-size: 1.2rem;
}

.btn-primary {
    background-color: var(--highlight);
    color: var(--white);
}

.btn-secondary {
    background-color: var(--accent);
    color: var(--text);
}

/* Responsive Design */
@media (min-width: 768px) {
    .logo-text {
        display: block;
    }
    
    .search-container.active {
        width: 300px;
    }
    
    .nav-item i {
        font-size: 1.5rem;
    }
    
    .dashboard {
        margin: 2rem auto;
        gap: 1.5rem;
        grid-template-columns: repeat(2, 1fr);
    }

    .daily-horoscope,
    .quick-actions {
        grid-column: span 2;
    }

    .action-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .content-box {
        min-height: 150px;
    }

    .news-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
}

@media (min-width: 1024px) {
    .dashboard {
        grid-template-columns: repeat(3, 1fr);
        gap: 2rem;
        padding: 0 2rem;
    }

    .daily-horoscope {
        grid-column: span 2;
    }

    .quick-actions {
        grid-column: span 3;
    }

    .news-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }

    h2 {
        font-size: 1.8rem;
    }

    .content-box {
        min-height: 180px;
    }

    .news-card h3 {
        font-size: 1.2rem;
    }

    .news-card p {
        font-size: 1rem;
    }
}

@media (max-width: 768px) {
    .welcome-section {
        padding: 2rem 1rem;
    }

    .welcome-section h1 {
        font-size: 2rem;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }
}

/* Touch-friendly improvements */
@media (hover: none) {
    .action-card:active,
    .news-card:active,
    section:active {
        transform: scale(0.98);
    }
}

/* Dark mode improvements */
[data-theme="dark"] .news-card {
    background: var(--white);
}

[data-theme="dark"] .news-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .loading {
    background: linear-gradient(90deg, 
        var(--background) 0%, 
        var(--white) 50%, 
        var(--background) 100%);
}

[data-theme="dark"] .action-card {
    background: var(--highlight);
}

[data-theme="dark"] .action-card:hover {
    background: var(--primary);
}

[data-theme="dark"] .zodiac-selector select {
    background-color: var(--white);
}
