/* css/styles.css */
:root {
    --bg-color: #f8fafc;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --card-bg: #ffffff;
    --border-color: #e2e8f0;
    --primary: #3b82f6;
    --primary-hover: #2563eb;
    --gradient: linear-gradient(135deg, #3b82f6, #8b5cf6);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-hover: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --radius: 16px;
    --transition: all 0.3s ease;
}

[data-theme="dark"] {
    --bg-color: #0f172a;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --card-bg: #1e293b;
    --border-color: #334155;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
    --shadow-hover: 0 10px 15px -3px rgba(0, 0, 0, 0.4);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    transition: background-color 0.3s ease, color 0.3s ease;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-hover);
}

/* --- APP ICON FIX --- */
.app-icon {
    flex-shrink: 0 !important; 
    width: 140px !important;
    height: 140px !important;
    background: transparent !important; /* Removes the blue gradient */
    border-radius: 24px;
    box-shadow: var(--shadow);
    overflow: hidden; /* Clips the image perfectly to the rounded corners */
    display: block !important; 
    padding: 0 !important;
}

.app-icon img,
img.app-icon {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important; /* Forces the image to fill every pixel */
    display: block;
    margin: 0;
    padding: 0;
    border: none;
}

/* Layout */
.container {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}

header {
    padding: 24px 0;
    border-bottom: 1px solid var(--border-color);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Centers the app icon perfectly inside the application cards */
.card .app-icon {
    margin: 0 auto 16px auto !important;
}

/* --- EXTRA SPACING BELOW NAVBAR --- */
main {
    padding-top: 20px !important; /* Pushes everything down globally */
}

/* Specific spacing for the MoneyList app header to make it look perfect */
.app-hero {
    margin-top: 20px; 
}

footer {
    text-align: center;
    padding: 30px 0;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 1rem;
}

.footer-links {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    gap: 20px;
}

/* Typography & Utilities */
h1 { font-size: 2.5rem; margin-bottom: 16px; line-height: 1.2; }
h2 { font-size: 1.8rem; margin-bottom: 24px; }
h3 { font-size: 1.2rem; margin-bottom: 12px; }
p { margin-bottom: 16px; color: var(--text-muted); }
.text-center { text-align: center; }

/* Components */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    text-align: center;
}

.btn-primary {
    background: var(--gradient);
    color: white !important;
    box-shadow: var(--shadow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
    color: white;
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-main);
}

.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 32px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-4px);
}

/* Feature Grid */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
    margin-top: 40px;
}

/* Theme Toggle */
.theme-toggle {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: var(--transition);
}
.theme-toggle:hover {
    background: var(--card-bg);
}

/* App Hero Section */
.app-hero {
    display: flex;
    align-items: center;
    gap: 40px;
    margin-bottom: 60px;
}
.app-icon {
    width: 120px;
    height: 120px;
    background: var(--gradient);
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 3rem;
    font-weight: bold;
    box-shadow: var(--shadow);
}
.app-info { flex: 1; }
.store-button {
    display: inline-block;
    background: var(--text-main);
    color: var(--bg-color) !important;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    margin-top: 10px;
    transition: var(--transition);
}
.store-button:hover { opacity: 0.9; transform: translateY(-2px); }

/* FAQ Accordion */
details {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 12px;
    padding: 16px;
}
summary {
    font-weight: 600;
    cursor: pointer;
    list-style: none;
    color: var(--text-main);
}
summary::-webkit-details-marker { display: none; }
details p { margin-top: 12px; margin-bottom: 0; }

/* Animations */
.fade-in {
    animation: fadeIn 0.6s ease forwards;
    opacity: 0;
    transform: translateY(10px);
}
@keyframes fadeIn {
    to { opacity: 1; transform: translateY(0); }
}

/* Responsive */
@media (max-width: 768px) {
    .app-hero { flex-direction: column; text-align: center; gap: 20px; }
    .grid { grid-template-columns: 1fr; }
    h1 { font-size: 2rem; }
}