/* --- New Color System & Base Styles --- */
:root {
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --secondary: #10b981;
    --secondary-hover: #0d9f6e;
    --accent: #f59e0b;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --font-family: 'Poppins', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    font-family: var(--font-family);
    background-color: var(--gray-50);
    color: var(--gray-800);
    line-height: 1.6;
    margin: 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 80px 20px 20px 20px; /* Added top padding for nav */
}

/* --- Top-Left Navigation --- */
.nav-buttons {
    position: fixed;
    top: 1.5rem;
    left: 1.5rem;
    z-index: 50;
    display: flex;
    gap: 0.75rem;
}

.nav-button {
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: white;
    border-radius: 50%;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transition: all 0.2s ease;
    text-decoration: none;
}

.nav-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.nav-button i {
    font-size: 1.1rem;
}

.nav-button.home i {
    color: var(--primary);
}

.nav-button.dashboard i {
    color: var(--secondary);
}

.nav-button::after {
    content: attr(aria-label);
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-top: 0.5rem;
    padding: 0.25rem 0.5rem;
    background-color: var(--gray-800);
    color: white;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    pointer-events: none;
}

.nav-button:hover::after {
    opacity: 1;
    visibility: visible;
}


/* --- Header Section --- */
.header-section {
    text-align: center;
    margin-bottom: 40px;
}

.main-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0 0 10px 0;
    color: var(--gray-900);
}

.subtitle {
    font-size: 1.1rem;
    color: var(--gray-500);
    max-width: 600px;
    margin: 0 auto;
}

/* --- Tabs --- */
.tabs {
    display: flex;
    justify-content: center;
    margin-bottom: 40px;
    background-color: var(--gray-200);
    border-radius: 12px;
    padding: 5px;
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
}

.tab-link {
    background: none;
    border: none;
    padding: 12px 25px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray-600);
    border-radius: 8px;
    transition: background-color 0.3s, color 0.3s;
    display: flex;
    align-items: center;
}

.tab-link i {
    margin-right: 8px;
}

.tab-link.active {
    background-color: white;
    color: var(--primary);
    box-shadow: 0 2px 4px rgba(0,0,0,0.08);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- Plan Grid & Cards --- */
.plan-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.plan-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--gray-200);
    padding: 30px;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
    overflow: hidden;
}

.plan-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

/* --- Popular Plan --- */
.plan-card.popular {
    border-color: var(--accent);
}

.popular-badge {
    position: absolute;
    top: 15px;
    right: -40px;
    background-color: var(--accent);
    color: white;
    padding: 5px 40px;
    font-size: 0.8rem;
    font-weight: 700;
    transform: rotate(45deg);
    text-align: center;
}

/* --- Card Content --- */
.card-header { margin-bottom: 20px; }
.plan-name { font-size: 1.5rem; font-weight: 700; margin: 0 0 10px 0; color: var(--gray-900); }
.plan-description { color: var(--gray-500); font-size: 0.9rem; min-height: 40px; }

.plan-price {
    margin-bottom: 25px;
    border-top: 1px solid var(--gray-200);
    border-bottom: 1px solid var(--gray-200);
    padding: 20px 0;
}

.price-amount { font-size: 2.8rem; font-weight: 700; color: var(--gray-800); }
.plan-card.popular .price-amount { color: var(--primary); }
.price-currency { font-size: 1.2rem; color: var(--gray-500); margin-left: 5px; }
.price-duration { display: block; color: var(--gray-500); font-size: 0.9rem; }

/* --- Features List --- */
.features-list { list-style: none; padding: 0; margin: 0 0 25px 0; flex-grow: 1; }
.feature-item { display: flex; align-items: flex-start; margin-bottom: 12px; font-size: 0.95rem; }
.feature-item i { margin-right: 12px; margin-top: 4px; font-size: 1.1rem; }
.feature-icon-check { color: var(--secondary); }
.feature-icon-ads { color: var(--primary); }

/* --- Card Footer & CTA Button --- */
.card-footer { margin-top: auto; }

.cta-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    width: 100%;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    box-shadow: 0 4px 15px rgba(79, 70, 229, 0.3);
    transition: all 0.3s ease;
    cursor: pointer;
    background: linear-gradient(135deg, var(--primary) 0%, #6d5dfc 100%);
}

.cta-button.secondary {
    background: linear-gradient(135deg, var(--secondary) 0%, #12d998 100%);
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(79, 70, 229, 0.4);
    background: linear-gradient(135deg, var(--primary-hover) 0%, #5a4fdf 100%);
}

.cta-button.secondary:hover {
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.4);
    background: linear-gradient(135deg, var(--secondary-hover) 0%, #10b981 100%);
}

.cta-button i { margin-right: 0.75rem; }

/* --- No Plans Available --- */
.no-plans-card { background: white; border-radius: 12px; padding: 40px; text-align: center; max-width: 500px; margin: 40px auto; border: 1px dashed var(--gray-300); }
.empty-icon { font-size: 3rem; color: var(--gray-300); margin-bottom: 20px; }
.no-plans-title { font-size: 1.5rem; margin: 0 0 10px 0; color: var(--gray-800); }
.no-plans-text { color: var(--gray-500); margin-bottom: 25px; }
.back-home-link { color: var(--primary); text-decoration: none; font-weight: 600; }
.back-home-link:hover { text-decoration: underline; }

/* --- Responsive Design --- */
@media (max-width: 768px) {
    .main-title { font-size: 2rem; }
    .tabs { flex-direction: column; width: 100%; }
    .tab-link { justify-content: center; }
    .plan-grid { grid-template-columns: 1fr; }
    .nav-buttons { top: 1rem; left: 1rem; }
}

