/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    color: #2c3e50;
    background: linear-gradient(135deg, #2d5f4f 0%, #1a4c3e 100%);
    min-height: 100vh;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
}

/* Title Animation Screen */
.title-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #2d5f4f 0%, #1a4c3e 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 1;
    transition: opacity 1s ease-out;
}

.title-animation.fade-out {
    opacity: 0;
    pointer-events: none;
}

.title-container {
    text-align: center;
    color: white;
}

.animated-logo {
    margin-bottom: 2rem;
    display: flex;
    justify-content: center;
}

.animated-logo svg {
    filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.3));
}

.logo-bar {
    fill: #45b883;
    animation: fillBar 0.8s ease-out forwards;
}

.bar-1 { animation-delay: 0.2s; }
.bar-2 { animation-delay: 0.4s; }
.bar-3 { animation-delay: 0.6s; }
.bar-4 { animation-delay: 0.8s; }

@keyframes fillBar {
    0% {
        opacity: 0;
        transform: scaleX(0);
        transform-origin: left;
    }
    50% {
        opacity: 1;
        transform: scaleX(0.5);
    }
    100% {
        opacity: 1;
        transform: scaleX(1);
    }
}

.animated-title {
    font-size: 4rem;
    font-weight: 700;
    margin: 0 0 1rem 0;
    display: flex;
    justify-content: center;
    gap: 0.1em;
    flex-wrap: wrap;
}

.letter {
    display: inline-block;
    opacity: 0;
    background: linear-gradient(45deg, #ffffff, #45b883);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: letterReveal 0.6s ease-out forwards;
    text-shadow: 0 0 30px rgba(69, 184, 131, 0.5);
}

.letter:nth-child(1) { animation-delay: 1.0s; }
.letter:nth-child(2) { animation-delay: 1.1s; }
.letter:nth-child(3) { animation-delay: 1.2s; }
.letter:nth-child(4) { animation-delay: 1.3s; }
.letter:nth-child(5) { animation-delay: 1.4s; }
.letter:nth-child(6) { animation-delay: 1.5s; }
.letter:nth-child(7) { animation-delay: 1.6s; }
.letter:nth-child(8) { animation-delay: 1.7s; }
.letter:nth-child(9) { animation-delay: 1.8s; }

@keyframes letterReveal {
    0% {
        opacity: 0;
        transform: translateY(50px) rotateX(-90deg);
        filter: blur(10px);
    }
    50% {
        opacity: 0.8;
        transform: translateY(-10px) rotateX(0deg);
        filter: blur(2px);
    }
    100% {
        opacity: 1;
        transform: translateY(0) rotateX(0deg);
        filter: blur(0);
    }
}

.animated-subtitle {
    font-size: 1.2rem;
    opacity: 0;
    color: rgba(255, 255, 255, 0.9);
    animation: subtitleFade 1s ease-out 2.2s forwards;
    font-weight: 300;
    text-align: center;
    padding: 0 2rem;
}

@keyframes subtitleFade {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 0.9;
        transform: translateY(0);
    }
}

/* Guest Dashboard Styles */
.guest-welcome {
    grid-column: 2 / -1;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
    padding: 2rem;
}

.guest-welcome-content {
    text-align: center;
    max-width: 900px;
    width: 100%;
    background: white;
    padding: 3rem;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

/* Guest New Plan Card */
.guest-new-plan {
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: 200px;
    max-height: 240px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    width: 280px;
}

.guest-new-plan:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(45, 95, 79, 0.2);
}

.guest-new-plan .plus-icon {
    font-size: 2.5rem;
    color: #2d5f4f;
    margin-bottom: 0.8rem;
    transition: transform 0.3s ease;
    font-weight: bold;
}

.guest-new-plan:hover .plus-icon {
    transform: scale(1.1);
}

.guest-new-plan h3 {
    color: #2d5f4f;
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.guest-new-plan p {
    color: #7f8c8d;
    font-size: 0.9rem;
    margin: 0;
    line-height: 1.4;
}

.guest-welcome-content h2 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #2d5f4f 0%, #45b883 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.guest-welcome-content > p {
    font-size: 1.2rem;
    color: #7f8c8d;
    margin-bottom: 2rem;
}

.guest-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.feature-item {
    text-align: left;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 12px;
    border-left: 4px solid #2d5f4f;
}

.feature-item h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: #2d5f4f;
}

.feature-item p {
    color: #666;
    font-size: 0.9rem;
    margin: 0;
}

.guest-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
}

.btn-secondary {
    background: linear-gradient(135deg, #6c757d, #5a6268);
    color: white;
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #5a6268, #495057);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(108, 117, 125, 0.3);
}

/* Guest button variants */
.guest-actions .btn-secondary {
    background: transparent;
    color: #2d5f4f;
    border: 2px solid #2d5f4f;
}

.guest-actions .btn-secondary:hover {
    background: #2d5f4f;
    color: white;
    transform: translateY(-2px);
}

/* Guest link styling */
.guest-link {
    color: #6c757d !important;
    font-size: 0.9rem;
    text-decoration: none;
    transition: color 0.3s ease;
}

.guest-link:hover {
    color: #2d5f4f !important;
    text-decoration: underline;
}

/* Login Screen Styles */
.login-screen {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #2d5f4f 0%, #1a4c3e 100%);
    position: relative;
}

.login-screen::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="1"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

.login-container {
    background: white;
    border-radius: 24px;
    padding: 3rem;
    box-shadow: 0 20px 50px rgba(0,0,0,0.3);
    max-width: 450px;
    width: 90%;
    position: relative;
    z-index: 1;
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-header .logo-container-login {
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    justify-content: center;
}

.login-subtitle {
    color: #7f8c8d;
    font-size: 1rem;
    margin: 0;
}

/* Login Logo Styles */
.logo-icon-login {
    background: rgba(45, 95, 79, 0.15);
    padding: 0.75rem;
    border-radius: 12px;
    border: 1px solid rgba(45, 95, 79, 0.2);
    color: #2d5f4f;
    box-shadow: 0 4px 12px rgba(45, 95, 79, 0.1);
    transition: transform 0.3s ease;
}

.logo-icon-login:hover {
    transform: scale(1.05);
}

.logo-icon-login svg {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    shape-rendering: geometricPrecision;
}

.logo-text-login {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #2d5f4f 0%, #45b883 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 2px 10px rgba(45, 95, 79, 0.1);
    margin: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Forgot Password Link */
.forgot-password {
    text-align: center;
    margin: 1rem 0;
}

.forgot-password a {
    color: #2d5f4f;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.forgot-password a:hover {
    color: #45b883;
    text-decoration: underline;
}

.login-form h2 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
    font-size: 1.8rem;
    text-align: center;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.login-form > p {
    text-align: center;
    color: #7f8c8d;
    margin-bottom: 2rem;
}

.btn-login {
    width: 100%;
    padding: 1rem;
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

.login-info {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 12px;
    border-left: 4px solid #2d5f4f;
}

.login-info p {
    margin: 0;
    font-size: 0.9rem;
    color: #6c757d;
}

/* Auth Form Styles */
.auth-form {
    margin-bottom: 1.5rem;
}

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

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

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s ease;
    background: white;
}

.form-control:focus {
    outline: none;
    border-color: #2d5f4f;
    box-shadow: 0 0 0 3px rgba(45, 95, 79, 0.1);
}

.form-control::placeholder {
    color: #6c757d;
}

.auth-switch {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e9ecef;
}

.auth-switch p {
    margin: 0;
    color: #6c757d;
    font-size: 0.9rem;
}

.auth-switch a {
    color: #2d5f4f;
    text-decoration: none;
    font-weight: 500;
}

.auth-switch a:hover {
    text-decoration: underline;
}

.error-message {
    background: #f8d7da;
    color: #721c24;
    padding: 0.75rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    border: 1px solid #f5c6cb;
    font-size: 0.9rem;
}

/* Email Disclaimer for Signup */
.email-disclaimer {
    background: linear-gradient(135deg, #e3f2fd, #f8f9fa);
    border: 1px solid #45b883;
    border-radius: 8px;
    padding: 0.75rem;
    margin: 1rem 0;
    text-align: center;
    box-shadow: 0 2px 8px rgba(69, 184, 131, 0.1);
}

.email-disclaimer p {
    margin: 0;
    color: #2c3e50;
    font-size: 0.9rem;
    line-height: 1.4;
}

.email-disclaimer strong {
    color: #45b883;
    font-weight: 600;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Settings Styles */
.settings-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
}

.settings-content {
    background: white;
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.settings-section {
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #e9ecef;
}

.settings-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.settings-section h3 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
    font-size: 1.4rem;
}

.settings-section p {
    color: #6c757d;
    margin-bottom: 1.5rem;
}

.default-colors-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.color-group h4 {
    color: #495057;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.color-inputs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
}

.color-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.color-item label {
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #495057;
    font-size: 0.9rem;
}

.color-item input[type="color"] {
    width: 60px;
    height: 40px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    cursor: pointer;
    transition: border-color 0.2s ease;
}

.color-item input[type="color"]:hover {
    border-color: #2d5f4f;
}

.logo-settings {
    display: flex;
    justify-content: center;
}

.setting-item {
    display: flex;
    flex-direction: column;
}

.setting-item label {
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #495057;
}

.setting-item input[type="range"] {
    margin-bottom: 0.5rem;
}

.setting-item select {
    padding: 0.5rem;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    background: white;
}

.range-value {
    font-size: 0.9rem;
    color: #6c757d;
    text-align: center;
}

.settings-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #e9ecef;
}

@media (max-width: 768px) {
    .default-colors-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .logo-settings {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .color-inputs {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .settings-actions {
        flex-direction: column;
    }
}

.app-container {
    max-width: 1800px;
    margin: 0 auto;
    background: white;
    min-height: 100vh;
    box-shadow: 0 0 50px rgba(45, 95, 79, 0.3);
    width: 95%;
    position: relative;
    display: flex;
    flex-direction: column;
    border-radius: 24px;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

/* Header */
.header {
    background: linear-gradient(135deg, #2d5f4f, #1a4c3e);
    color: white;
    padding: 2rem 0;
    position: relative;
    overflow: hidden;
}

.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="1"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

.header-content {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-user {
    display: flex;
    align-items: center;
    color: white;
    font-weight: 500;
}

.logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.logo-icon-nav {
    padding: 0.5rem;
    color: white;
}

.logo-icon-nav svg {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    shape-rendering: geometricPrecision;
}

.logo-text {
    font-size: 3rem;
    font-weight: 700;
    margin: 0;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    background: linear-gradient(45deg, #ffffff, #e0f2fe);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.subtitle {
    font-size: 1.2rem;
    margin: 0;
    opacity: 0.9;
    font-weight: 300;
    letter-spacing: 0.5px;
}

/* Navigation */
.navigation {
    background: linear-gradient(135deg, #2d5f4f, #1a4c3e);
    border-bottom: 1px solid rgba(45, 95, 79, 0.1);
    padding: 1rem 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    position: relative;
    overflow: visible;
    z-index: 1000;
}

.navigation::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="20" cy="20" r="1" fill="rgba(255,255,255,0.05)"/><circle cx="80" cy="40" r="1" fill="rgba(255,255,255,0.03)"/><circle cx="40" cy="80" r="1" fill="rgba(255,255,255,0.04)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    pointer-events: none;
}

.nav-container {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    width: 100%;
    padding: 0 1rem;
    position: relative;
    z-index: 100;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
    justify-content: flex-start;
}

.nav-right {
    display: flex;
    align-items: center;
    margin-left: auto;
}

/* Logo in Navigation */
.logo-container-nav {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0.9rem;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: white;
    margin-right: 2rem;
    flex-shrink: 0;
    margin-left: 0;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
    transition: all 0.3s ease;
    backdrop-filter: blur(12px);
}

.logo-container-nav:hover {
    background: rgba(255, 255, 255, 0.22);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.logo-icon-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    padding: 0.4rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.logo-container-nav:hover .logo-icon-nav {
    background: rgba(255, 255, 255, 0.15);
    transform: scale(1.05);
}

.logo-icon-nav svg {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    shape-rendering: geometricPrecision;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

.logo-text-nav {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
    background: linear-gradient(45deg, #ffffff, #e0f2fe);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.nav-buttons {
    display: flex;
    gap: 1rem;
    flex-shrink: 0;
    margin-left: 0;
}

.nav-btn {
    padding: 0.75rem 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.nav-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s;
}

.nav-btn:hover::before {
    left: 100%;
}

.nav-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.nav-btn.active {
    background: rgba(255, 255, 255, 0.9);
    color: #2d5f4f;
    border-color: rgba(255, 255, 255, 0.8);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Profile Dropdown */
.profile-dropdown {
    position: relative;
    z-index: 99999;
}

.profile-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    color: white;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.profile-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.dropdown-arrow {
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

.profile-dropdown.open .dropdown-arrow {
    transform: rotate(180deg);
}

.profile-menu {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    background: white;
    border: 1px solid rgba(45, 95, 79, 0.1);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    min-width: 180px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 99999;
}

.profile-dropdown.open .profile-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.profile-menu-item {
    width: 100%;
    padding: 0.75rem 1rem;
    border: none;
    background: none;
    color: #495057;
    text-align: left;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    border-radius: 0;
}

.profile-menu-item:first-child {
    border-radius: 12px 12px 0 0;
}

.profile-menu-item:last-child {
    border-radius: 0 0 12px 12px;
}

.profile-menu-item:hover {
    background: rgba(45, 95, 79, 0.1);
    color: #2d5f4f;
}

.profile-menu-divider {
    margin: 0;
    border: none;
    border-top: 1px solid rgba(45, 95, 79, 0.1);
}

/* Main Content */
.main-content {
    padding: 1rem 2rem 2rem 2rem;
    flex: 1;
    background: white;
    position: relative;
    z-index: 1;
}

.content-header {
    margin-bottom: 2rem;
}

.content-header h2 {
    font-size: 1.8rem;
    font-weight: 600;
    color: #2c3e50;
}

/* Views */
.view {
    display: none;
}

.view.active {
    display: block;
}

/* Dashboard */
.plans-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem 2rem;
    background: linear-gradient(135deg, #f8f9fa, #ffffff);
    border-radius: 16px;
    border: 1px solid rgba(45, 95, 79, 0.1);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.empty-state h3 {
    font-size: 1.5rem;
    color: #6c757d;
    margin-bottom: 1rem;
}

.empty-state p {
    color: #adb5bd;
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

/* Search Input */
.search-container {
    position: relative;
    display: inline-block;
}

.search-input {
    padding: 0.75rem 2.5rem 0.75rem 1rem;
    border: 1px solid rgba(45, 95, 79, 0.2);
    border-radius: 12px;
    font-size: 1rem;
    width: 250px;
    transition: all 0.3s ease;
    background: rgba(248, 249, 250, 0.5);
}

.search-input:focus {
    outline: none;
    border-color: #2d5f4f;
    box-shadow: 0 0 0 3px rgba(45, 95, 79, 0.1);
    background: white;
    transform: translateY(-1px);
}

.search-icon {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
    pointer-events: none;
    font-size: 1rem;
}

/* Plan Cards */
.plan-card {
    background: white;
    border: 1px solid rgba(45, 95, 79, 0.1);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.plan-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #2d5f4f, #1a4c3e, #4ade80);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.plan-card:hover::before {
    transform: scaleX(1);
}

.plan-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(45, 95, 79, 0.15);
    border-color: rgba(45, 95, 79, 0.2);
}

.plan-card h4 {
    font-size: 1.3rem;
    color: #2c3e50;
    margin-bottom: 1rem;
}

.plan-card p {
    color: #6c757d;
    margin-bottom: 0.5rem;
}

.new-plan-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(45, 95, 79, 0.2);
    border-color: #2d5f4f !important;
}

/* Favorite Button */
.favorite-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.25rem;
    color: #ddd;
    transition: all 0.3s ease;
    border-radius: 50%;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.favorite-btn:hover {
    color: #ffd700;
    background: rgba(255, 215, 0, 0.1);
    transform: scale(1.1);
}

.favorite-btn.favorited {
    color: #ffd700;
}

.favorite-btn.favorited:hover {
    color: #ffed4e;
}

/* Editor Layout */
.editor-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 1.5rem;
    height: calc(100vh - 200px);
}

.settings-panel, .preview-panel {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 1rem;
    overflow-y: auto;
}

.settings-panel {
    width: 220px;
    overflow-y: auto;
    max-height: calc(100vh - 200px);
}

.settings-panel h3, .preview-panel h3 {
    font-size: 1.3rem;
    color: #2c3e50;
    margin-bottom: 1rem;
    border-bottom: 1px solid #e9ecef;
    padding-bottom: 0.5rem;
}

/* Setting Groups - Reduced spacing for better fit */
.setting-group {
    margin-bottom: 1.5rem;
}

.setting-group h4 {
    font-size: 1.1rem;
    color: #495057;
    margin-bottom: 0.75rem;
    font-weight: 600;
}

/* Form Controls - Tighter spacing */
.form-group {
    margin-bottom: 0.75rem;
}

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

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid rgba(45, 95, 79, 0.2);
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: rgba(248, 249, 250, 0.5);
}

.form-control:focus {
    outline: none;
    border-color: #2d5f4f;
    box-shadow: 0 0 0 3px rgba(45, 95, 79, 0.1);
    background: white;
    transform: translateY(-1px);
}

.form-range {
    width: 100%;
    margin-bottom: 0.5rem;
}

.range-value {
    font-weight: 500;
    color: #2d5f4f;
}

/* Color Inputs - Compact grid to fit all colors without scrolling */
.color-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
    max-height: none;
    overflow: visible;
}

.color-input-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.color-input-group label {
    flex: 1;
    margin-bottom: 0;
    font-weight: 500;
    font-size: 0.9rem;
}

.color-input {
    width: 32px;
    height: 32px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    cursor: pointer;
}

/* File Inputs */
.file-input {
    display: none;
}

.file-label {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: #f8f9fa;
    border: 1px solid #ced4da;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.file-label:hover {
    background: #e9ecef;
}

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 500;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    transition: all 0.3s ease;
    font-size: 1rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, #2d5f4f, #1a4c3e);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #1a4c3e, #0f3329);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(45, 95, 79, 0.3);
}

.btn-secondary {
    background: linear-gradient(135deg, #6c757d, #5a6268);
    color: white;
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #5a6268, #495057);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(108, 117, 125, 0.3);
}

/* Upload Section */
.upload-section {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, #f8f9fa, #ffffff);
    border-radius: 16px;
    text-align: center;
    border: 1px solid rgba(45, 95, 79, 0.1);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

/* Chart Container */
.chart-container {
    margin: 0.5rem 0;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    padding: 0.25rem;
    width: 100%;
    height: 600px;
    overflow: hidden;
}

.chart-placeholder {
    text-align: center;
    color: #6c757d;
}

.chart-placeholder p {
    font-size: 1.1rem;
}

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

/* Chart Controls */
.chart-controls {
    margin-top: 0.5rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

/* Preview Header */
.preview-header {
    margin-bottom: 1rem;
}

.preview-header h3 {
    margin: 0 0 1rem 0;
}

.preview-controls {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.action-buttons-header {
    display: flex;
    gap: 0.75rem;
    flex-wrap: nowrap;
    align-items: center;
}

.file-label-small {
    padding: 0.75rem 1.5rem;
    line-height: 1.5;
    box-sizing: border-box;
}

/* Export Quality Disclaimer */
.export-disclaimer {
    margin-top: 0.5rem;
    text-align: center;
    color: #6c757d;
    font-style: italic;
}

.export-disclaimer small {
    font-size: 0.85rem;
}

.btn {
    padding: 0.75rem 1.5rem;
    line-height: 1.5;
    box-sizing: border-box;
}

.file-label-small {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: #6c757d;
    color: white;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: background-color 0.2s ease;
    border: none;
    text-align: center;
}

.file-label-small:hover {
    background: #545b62;
    transform: translateY(-1px);
}

/* Export Dropdown */
.export-dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-toggle {
    position: relative;
}

.dropdown-toggle::after {
    content: " ▼";
    font-size: 0.8rem;
    margin-left: 0.5rem;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    min-width: 150px;
    z-index: 1000;
    display: none;
}

.dropdown-menu.show {
    display: block;
}

.dropdown-item {
    display: block;
    width: 100%;
    padding: 0.75rem 1rem;
    border: none;
    background: none;
    text-align: left;
    color: #495057;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.dropdown-item:hover {
    background-color: #f8f9fa;
}

.dropdown-item:first-child {
    border-radius: 6px 6px 0 0;
}

.dropdown-item:last-child {
    border-radius: 0 0 6px 6px;
}

/* Help Content */
.help-content {
    max-width: 900px;
    padding: 2rem;
    margin: 0 auto;
    line-height: 1.6;
}

.help-section {
    margin-bottom: 3rem;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 12px;
    border-left: 4px solid var(--primary-color);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.help-section h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.5rem;
    font-weight: 600;
}

.help-section h4 {
    color: var(--accent-color);
    margin: 1.5rem 0 0.75rem 0;
    font-size: 1.2rem;
    font-weight: 500;
}

.help-section p {
    margin-bottom: 1rem;
    color: #333;
}

.help-section ul {
    margin: 1rem 0 1rem 1.5rem;
}

.help-section li {
    margin-bottom: 0.75rem;
    color: #444;
}

.help-section strong {
    color: var(--primary-color);
    font-weight: 600;
}

/* Help dropdown sections */
.help-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    padding: 1rem 0;
    user-select: none;
}

.help-header:hover {
    background: rgba(45, 95, 79, 0.05);
    border-radius: 8px;
    padding: 1rem;
    margin: 0 -1rem;
}

.help-toggle {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
    transition: transform 0.3s ease;
}

.help-toggle.expanded {
    transform: rotate(45deg);
}

.help-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.help-body.expanded {
    max-height: 1000px;
    padding-bottom: 1rem;
}

/* Download template button styling */
.download-btn {
    background: #28a745 !important;
    color: white !important;
}

.download-btn:hover {
    background: #218838 !important;
}

/* Template download page styles */
.template-content {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem;
}

.template-section {
    margin-bottom: 3rem;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 249, 250, 0.95) 100%);
    padding: 2.5rem;
    border-radius: 16px;
    border-left: 5px solid #3498db;
    box-shadow: 0 6px 24px rgba(0,0,0,0.08);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.template-section h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.template-section h4 {
    color: var(--accent-color);
    margin: 1rem 0 0.5rem 0;
    font-size: 1.2rem;
}

.template-features ul {
    margin: 1rem 0 0 1.5rem;
}

.template-features li {
    margin-bottom: 0.75rem;
    color: #444;
}

.usage-steps {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.step {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.step-number {
    background: var(--primary-color);
    color: white;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.step-content h4 {
    margin: 0 0 0.5rem 0;
    color: var(--primary-color);
}

.step-content p {
    margin: 0;
    color: #444;
}

.requirements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.requirement {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    padding: 1.8rem;
    border-radius: 12px;
    border: 1px solid #e1e8ed;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transition: all 0.3s ease;
}

.requirement:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
    border-color: #3498db;
}

.requirement h4 {
    margin: 0 0 0.75rem 0;
    color: #2c3e50;
    font-size: 1.2rem;
    font-weight: 600;
    border-bottom: 2px solid #3498db;
    padding-bottom: 0.5rem;
}

.requirement p {
    margin: 0.5rem 0 0 0;
    color: #555;
    font-size: 0.95rem;
    line-height: 1.5;
}

.requirement p strong {
    color: #2c3e50;
    font-weight: 600;
}

.download-section {
    text-align: center;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    padding: 3rem 2rem;
    border-radius: 12px;
    margin-top: 2rem;
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.2rem;
    font-weight: 600;
    background: white;
    color: var(--primary-color);
    border: none;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.btn-large:hover {
    background: #f8f9fa;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.download-note {
    margin: 0;
    font-size: 0.9rem;
    opacity: 0.9;
}

/* Enhanced template page styles */
.formatting-guide {
    margin-bottom: 2rem;
}

.formatting-guide h4 {
    color: var(--primary-color);
    margin: 1.5rem 0 1rem 0;
    font-size: 1.2rem;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 0.5rem;
}

.formatting-tips {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 2rem;
    border-radius: 12px;
    border-left: 5px solid #17a2b8;
    margin-bottom: 2rem;
    box-shadow: 0 3px 12px rgba(0,0,0,0.08);
}

.formatting-tips h4 {
    color: #17a2b8;
    margin-top: 0;
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.formatting-tips ul {
    margin: 1rem 0 0 0;
    list-style: none;
}

.formatting-tips li {
    margin-bottom: 1rem;
    color: #444;
    line-height: 1.6;
    padding-left: 1.5rem;
    position: relative;
}

.formatting-tips li:before {
    content: "✓";
    color: #28a745;
    font-weight: bold;
    position: absolute;
    left: 0;
    top: 0;
}

.example-data {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.example-data h4 {
    color: var(--primary-color);
    margin-top: 0;
}

.data-table {
    overflow-x: auto;
    margin-top: 1rem;
}

.data-table table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.data-table th,
.data-table td {
    padding: 0.75rem;
    text-align: left;
    border: 1px solid #dee2e6;
}

.data-table th {
    background: var(--primary-color);
    color: white;
    font-weight: 600;
}

.data-table tbody tr:nth-child(even) {
    background: #f8f9fa;
}

/* Notification styling */
.notification {
    position: fixed;
    right: 20px;
    z-index: 1000;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    font-weight: 500;
    max-width: 350px;
    word-wrap: break-word;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    transition: all 0.3s ease-out;
}

.notification.success {
    background: #2d5f4f;
    color: white;
}

.notification.error {
    background: #dc3545;
    color: white;
}

.notification.info {
    background: #1a4c3e;
    color: white;
}

.notification .close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    padding: 0;
    margin: 0;
    line-height: 1;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.8;
    transition: opacity 0.2s;
    border-radius: 50%;
}

.notification .close-btn:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.1);
}

/* ROFR Features styling */
.rofr-features {
    display: grid;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.rofr-feature {
    background: linear-gradient(135deg, #f8f9fa 0%, #fff 100%);
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid var(--accent-color);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.rofr-feature h4 {
    color: var(--primary-color);
    margin: 0 0 0.75rem 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.rofr-feature p {
    margin: 0.5rem 0;
    color: #444;
    line-height: 1.5;
}

.rofr-feature p:last-child {
    margin-bottom: 0;
}

.rofr-feature strong {
    color: var(--accent-color);
}

.data-table tbody tr:hover {
    background: #e9ecef;
}

/* Legal Modal Styles */
.legal-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease-out;
}

.legal-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.legal-modal-content {
    position: relative;
    background: white;
    border-radius: 12px;
    max-width: 800px;
    max-height: 90vh;
    width: 90%;
    margin: 0 auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    animation: slideUp 0.3s ease-out;
}

.legal-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid #e9ecef;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
}

.legal-modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
}

.legal-modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    padding: 0;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s ease;
}

.legal-modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.legal-modal-body {
    padding: 0;
    overflow-y: auto;
    max-height: calc(90vh - 120px);
}

.legal-content {
    padding: 2rem;
}

.legal-title {
    text-align: center;
    color: var(--primary-color);
    margin: 0 0 1rem 0;
    font-size: 2rem;
    font-weight: 700;
    border-bottom: 3px solid var(--accent-color);
    padding-bottom: 1rem;
}

.legal-date {
    font-style: italic;
    color: #666;
    text-align: center;
    margin-bottom: 2rem;
    font-size: 0.9rem;
}

.legal-section {
    margin-bottom: 2rem;
}

.legal-section h3 {
    color: var(--primary-color);
    margin: 0 0 1rem 0;
    font-size: 1.2rem;
    font-weight: 600;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 0.5rem;
}

.legal-section p {
    margin: 0 0 1rem 0;
    line-height: 1.6;
    color: #444;
}

.legal-section ul {
    margin: 1rem 0 1rem 1.5rem;
    color: #444;
}

.legal-section li {
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

.legal-section a {
    color: var(--primary-color);
    text-decoration: none;
}

.legal-section a:hover {
    text-decoration: underline;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Mobile responsive for legal modal */
@media (max-width: 768px) {
    .legal-modal-content {
        width: 95%;
        max-height: 95vh;
        margin: 0;
    }
    
    .legal-modal-header {
        padding: 1rem 1.5rem;
    }
    
    .legal-modal-header h2 {
        font-size: 1.3rem;
    }
    
    .legal-content {
        padding: 1.5rem;
    }
    
    .legal-title {
        font-size: 1.5rem;
    }
    
    .legal-modal-body {
        max-height: calc(95vh - 100px);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    /* Title Animation Mobile Styles */
    .animated-title {
        font-size: 2.5rem;
        line-height: 1.2;
    }
    
    .animated-subtitle {
        font-size: 1rem;
        padding: 0 1rem;
    }
    
    .animated-logo svg {
        width: 80px;
        height: 80px;
    }
    
    /* App Container Mobile */
    .app-container {
        width: 100%;
        border-radius: 0;
        margin: 0;
    }
    
    /* Header Mobile */
    .header {
        padding: 1rem 0;
    }
    
    .header-content {
        flex-direction: column;
        gap: 1rem;
        padding: 0 1rem;
        text-align: center;
    }
    
    .logo-container {
        margin-bottom: 0;
        justify-content: center;
    }
    
    .logo-text {
        font-size: 1.8rem;
        line-height: 1.1;
    }
    
    .header-user {
        align-self: center;
        font-size: 0.9rem;
        background: rgba(255, 255, 255, 0.1);
        padding: 0.5rem 1rem;
        border-radius: 20px;
        backdrop-filter: blur(10px);
    }
    
    /* Navigation Mobile */
    .nav-container {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
        background: rgba(45, 95, 79, 0.05);
        border-top: 1px solid rgba(45, 95, 79, 0.1);
    }
    
    .nav-left {
        display: flex;
        flex-direction: column;
        gap: 1rem;
        align-items: center;
        width: 100%;
    }
    
    .logo-container-nav {
        display: none; /* Hide logo in nav on mobile since it's in header */
    }
    
    .nav-buttons {
        display: flex;
        justify-content: center;
        gap: 0.5rem;
        flex-wrap: wrap;
        width: 100%;
    }
    
    .nav-btn {
        flex: 1;
        min-width: 100px;
        max-width: 130px;
        padding: 0.75rem 0.25rem;
        font-size: 0.8rem;
        font-weight: 500;
        border-radius: 8px;
        text-align: center;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .nav-right {
        width: 100%;
        display: flex;
        justify-content: center;
    }
    
    .profile-dropdown {
        position: relative;
        width: auto;
    }
    
    .profile-btn {
        min-width: 150px;
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
        border-radius: 8px;
        background: rgba(45, 95, 79, 0.1);
        border: 1px solid rgba(45, 95, 79, 0.2);
    }
    
    .profile-menu {
        position: absolute;
        top: 100%;
        left: 50%;
        transform: translateX(-50%);
        width: 200px;
        margin-top: 0.5rem;
        box-shadow: 0 4px 12px rgba(0,0,0,0.15);
        border: 1px solid #e9ecef;
        border-radius: 8px;
        z-index: 1000;
        background: white;
    }
    
    /* Content Area Mobile */
    .content {
        padding: 1rem;
    }
    
    .content-header {
        text-align: center;
        margin-bottom: 1.5rem;
    }
    
    .content-header h2 {
        font-size: 1.8rem;
        margin-bottom: 0.5rem;
    }
    
    /* Dashboard Controls Mobile */
    .dashboard-controls {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
        margin-bottom: 1.5rem;
    }
    
    .search-container {
        width: 100%;
        max-width: none;
    }
    
    .filter-controls {
        flex-direction: column;
        gap: 1rem;
        width: 100%;
    }
    
    .filter-group {
        width: 100%;
    }
    
    .filter-group select {
        width: 100%;
        padding: 0.75rem;
        font-size: 1rem;
    }
    
    /* Plans Grid Mobile */
    .plans-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 0;
    }
    
    .plan-card {
        margin: 0;
        min-height: 120px;
    }
    
    .guest-welcome {
        grid-column: 1;
        margin: 1rem 0;
        min-height: auto;
    }
    
    .guest-welcome-content {
        padding: 2rem 1rem;
    }
    
    .guest-welcome-content h2 {
        font-size: 1.8rem;
        margin-bottom: 0.5rem;
    }
    
    .guest-features {
        grid-template-columns: 1fr;
        gap: 1rem;
        margin: 2rem 0;
    }
    
    .guest-actions {
        flex-direction: column;
        gap: 1rem;
    }
    
    /* Editor Layout Mobile */
    .editor-layout {
        grid-template-columns: 1fr;
        gap: 1rem;
        height: auto;
        padding: 1rem;
    }
    
    .editor-sidebar {
        order: -1;
    }
    
    .settings-panel {
        padding: 1rem;
    }
    
    .color-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .color-row {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .color-inputs {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    /* Action Buttons Mobile */
    .action-buttons {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .action-buttons .btn {
        width: 100%;
        padding: 1rem;
        font-size: 1rem;
    }
    
    /* Login Screen Mobile */
    .login-container {
        padding: 2rem 1rem;
        margin: 1rem;
        border-radius: 12px;
    }
    
    .login-form {
        padding: 0;
    }
    
    .form-group input,
    .form-group button {
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    /* Chart Preview Mobile */
    .chart-preview {
        padding: 1rem;
    }
    
    .chart-preview img {
        max-width: 100%;
        height: auto;
    }
    
    /* Settings Mobile */
    .settings-content {
        padding: 1rem;
    }
    
    .logo-settings {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    /* Template Page Mobile */
    .template-content {
        padding: 1rem;
    }
    
    .download-section {
        padding: 2rem 1rem;
        margin: 1rem 0;
        border-radius: 8px;
    }
    
    .btn-large {
        width: 100%;
        padding: 1rem;
        font-size: 1.1rem;
        margin-bottom: 1rem;
    }
    
    /* Help Page Mobile */
    .help-content {
        padding: 1rem;
    }
    
    .help-section {
        margin-bottom: 2rem;
    }
    
    /* Utility Classes for Mobile */
    .hide-mobile {
        display: none !important;
    }
    
    .show-mobile {
        display: block !important;
    }
}

/* Extra Small Mobile Devices */
@media (max-width: 480px) {
    .animated-title {
        font-size: 2rem;
    }
    
    .logo-text {
        font-size: 1.5rem;
    }
    
    .nav-btn {
        padding: 0.75rem;
        font-size: 0.9rem;
    }
    
    .plans-grid {
        padding: 0.5rem;
    }
    
    .editor-layout {
        padding: 0.5rem;
    }
    
    .login-container {
        margin: 0.5rem;
        padding: 1.5rem 1rem;
    }
    
    .settings-content,
    .template-content,
    .help-content {
        padding: 0.5rem;
    }
    
    /* Touch improvements for small screens */
    .btn, .nav-btn, .plan-card {
        min-height: 44px; /* Apple's recommended minimum touch target */
    }
    
    .form-control {
        font-size: 16px; /* Prevents zoom on iOS */
        min-height: 44px;
    }
}


/* Welcome Tutorial Styles */
.tutorial-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    backdrop-filter: blur(5px);
}

.tutorial-modal {
    background: white;
    padding: 2rem;
    border-radius: 16px;
    max-width: 650px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: tutorialSlideIn 0.3s ease-out;
}

@keyframes tutorialSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tutorial-header {
    text-align: center;
    margin-bottom: 2rem;
}

.tutorial-header h2 {
    color: #2d5f4f;
    margin-bottom: 0.5rem;
    font-size: 1.8rem;
}

.tutorial-header p {
    color: #666;
    font-size: 1rem;
}

.tutorial-steps {
    margin-bottom: 2rem;
}

.tutorial-step {
    display: flex;
    align-items: flex-start;
    margin-bottom: 1.5rem;
    padding: 1rem;
    border-radius: 8px;
    background: #f8f9fa;
    border-left: 4px solid #2d5f4f;
}

.step-number {
    background: #2d5f4f;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-right: 1rem;
    flex-shrink: 0;
}

.step-content h3 {
    margin: 0 0 0.5rem 0;
    color: #2c3e50;
    font-size: 1.1rem;
}

.step-content p {
    margin: 0 0 0.75rem 0;
    color: #666;
    font-size: 0.9rem;
    line-height: 1.4;
}

.step-tip {
    background: #e8f5e8;
    border: 1px solid #c3e6c3;
    border-radius: 6px;
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
    color: #2d5f4f;
    margin-top: 0.5rem;
    line-height: 1.3;
}

.tutorial-footer {
    border-top: 1px solid #e9ecef;
    padding-top: 1.5rem;
    margin-top: 1rem;
    margin-bottom: 1.5rem;
}

.tutorial-help h4 {
    color: #2d5f4f;
    font-size: 1rem;
    margin: 0 0 0.5rem 0;
}

.tutorial-help p {
    color: #666;
    font-size: 0.9rem;
    margin: 0;
    line-height: 1.4;
}

.tutorial-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.tutorial-actions .btn {
    flex: 1;
    max-width: 150px;
}

/* Mobile Tutorial Styles */
@media (max-width: 768px) {
    .tutorial-modal {
        padding: 1.5rem;
        margin: 1rem;
        max-width: none;
    }
    
    .tutorial-header h2 {
        font-size: 1.5rem;
    }
    
    .tutorial-actions {
        flex-direction: column;
    }
    
    .tutorial-actions .btn {
        max-width: none;
    }
}

/* Contact Form Styling */
.contact-form-container {
    max-width: 800px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
    padding: 2rem 0;
}

.contact-form {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 2rem;
}

.contact-form .form-group {
    margin-bottom: 1.5rem;
}

.contact-form label {
    display: block;
    margin-bottom: 0.5rem;
    color: #2d5f4f;
    font-weight: 500;
}

.contact-form .form-control {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    font-size: 0.95rem;
    transition: border-color 0.2s ease;
}

.contact-form .form-control:focus {
    outline: none;
    border-color: #45b883;
    box-shadow: 0 0 0 3px rgba(69, 184, 131, 0.1);
}

.contact-form textarea.form-control {
    resize: vertical;
    min-height: 120px;
    font-family: inherit;
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.btn-loading {
    display: none;
}

.contact-info {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 2rem;
    height: fit-content;
    border-left: 4px solid #45b883;
}

.contact-info h3 {
    color: #2d5f4f;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.contact-info p {
    color: #495057;
    margin-bottom: 0.75rem;
    line-height: 1.5;
}

.contact-email-direct {
    display: inline-block;
    color: #45b883;
    text-decoration: none;
    font-weight: 600;
    padding: 0.5rem 1rem;
    background: white;
    border-radius: 6px;
    border: 2px solid #45b883;
    transition: all 0.2s ease;
    margin: 0.5rem 0;
}

.contact-email-direct:hover {
    background: #45b883;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(69, 184, 131, 0.3);
}

.response-time {
    font-size: 0.9rem;
    color: #6c757d;
    margin-top: 1rem;
}

/* Mobile responsive contact form */
@media (max-width: 768px) {
    .contact-form-container {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 1rem;
    }
    
    .contact-form, .contact-info {
        padding: 1.5rem;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .form-actions .btn {
        width: 100%;
    }
}



/* Ensure proper page layout with footer */
html, body {
    height: 100%;
}

.app-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.main-content {
    flex: 1;
}

/* Footer Styling */
.app-footer {
    background: linear-gradient(135deg, #2d5f4f 0%, #1a4c3e 100%);
    color: white;
    padding: 2rem 0;
    margin-top: auto;
    text-align: center;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.footer-content p {
    margin: 0.5rem 0;
    font-size: 0.9rem;
    opacity: 0.9;
}

.copyright {
    font-weight: 600;
    margin-bottom: 0.25rem !important;
}

.product-attribution {
    font-size: 0.85rem !important;
    opacity: 0.8;
}

/* Footer legal links */
.footer-links {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 0.8rem;
    margin: 0 1rem;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: white;
    text-decoration: underline;
}

/* Guest navigation bar for legal pages */
.guest-nav-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, #2d5f4f 0%, #45b883 100%);
    position: relative;
}

.guest-nav-bar .guest-profile {
    position: absolute;
    right: 2rem;
}

/* Legal page styling - integrated into main app */
.legal-page {
    background: #f8f9fa;
    min-height: 100vh;
    padding: 2rem 0;
}

.legal-page-container {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    padding: 3rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.legal-page-header h1 {
    color: #2d5f4f;
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    text-align: center;
}

.legal-page-content {
    line-height: 1.6;
    color: #333;
}

.last-updated {
    text-align: center;
    color: #666;
    font-style: italic;
    margin-bottom: 2rem;
    font-size: 0.9rem;
}

.legal-section {
    margin-bottom: 2rem;
}

.legal-section h2 {
    color: #2d5f4f;
    font-size: 1.5rem;
    margin-bottom: 1rem;
    border-bottom: 2px solid #45b883;
    padding-bottom: 0.5rem;
}

.legal-section p {
    margin-bottom: 1rem;
}

.legal-section ul {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.legal-section li {
    margin-bottom: 0.5rem;
}

.legal-section a {
    color: #45b883;
    text-decoration: none;
}

.legal-section a:hover {
    text-decoration: underline;
}

.legal-page-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 2rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.legal-page-header {
    padding: 2rem 0 1rem 0;
    border-bottom: 2px solid #e8e9ea;
    margin-bottom: 2rem;
}

.legal-page-header h1 {
    color: #2d5f4f;
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0;
    text-align: center;
}

.legal-page-content {
    padding: 0 2rem 3rem 2rem;
}

/* Legal section styling for legal-page layout */
.legal-page .legal-section {
    margin-bottom: 2.5rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #e8e9ea;
}

.legal-page .legal-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.legal-page .legal-section h2 {
    color: #2d5f4f;
    margin-bottom: 1.2rem;
    font-size: 1.5rem;
    font-weight: 600;
}

.legal-page .legal-section p {
    line-height: 1.7;
    margin-bottom: 1.2rem;
    color: #4a5568;
    font-size: 1rem;
}

.legal-page .legal-section ul {
    margin: 1.2rem 0;
    padding-left: 1.8rem;
}

.legal-page .legal-section li {
    margin-bottom: 0.8rem;
    line-height: 1.7;
    color: #4a5568;
    font-size: 1rem;
}

.legal-page .legal-section li strong {
    color: #2d5f4f;
    font-weight: 600;
}

.legal-page .last-updated {
    color: #718096;
    font-style: italic;
    margin-bottom: 2.5rem;
    font-size: 0.95rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e8e9ea;
}

/* Mobile footer adjustments */
@media (max-width: 768px) {
    .app-footer {
        padding: 1.5rem 0;
    }
    
    .footer-content {
        padding: 0 1rem;
    }
    
    .footer-content p {
        font-size: 0.8rem;
    }
    
    .footer-links a {
        margin: 0 0.5rem;
        font-size: 0.75rem;
    }
    
    .legal-content {
        padding: 1rem;
    }
    
    .legal-container h1 {
        font-size: 2rem;
    }
}

/* Terms agreement checkbox styling */
.terms-agreement {
    margin: 1.5rem 0;
    padding: 1rem;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    cursor: pointer;
    font-size: 0.9rem;
    line-height: 1.5;
    color: #555;
}

.checkbox-label input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 22px;
    height: 22px;
    border: 2px solid #ddd;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.3s ease;
    margin-top: 2px;
    background: white;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark {
    background: #45b883;
    border-color: #45b883;
    transform: scale(1.05);
}

.checkbox-label input[type="checkbox"]:checked + .checkmark::after {
    content: "✓";
    color: white;
    font-weight: bold;
    font-size: 14px;
}

.terms-text {
    flex: 1;
    padding-top: 1px;
}

.terms-agreement a {
    color: #45b883;
    text-decoration: none;
    font-weight: 600;
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s ease;
}

.terms-agreement a:hover {
    border-bottom-color: #45b883;
}

@media (max-width: 768px) {
    .terms-agreement {
        margin: 1rem 0;
        padding: 0.75rem;
    }
    
    .checkbox-label {
        font-size: 0.85rem;
        gap: 0.75rem;
    }
    
    .checkmark {
        width: 20px;
        height: 20px;
    }
    
    .checkbox-label input[type="checkbox"]:checked + .checkmark::after {
        font-size: 12px;
    }
}

/* Additional jungle green accents */
.header h1 {
    color: #1a4c3e;
}

.content-header h2 {
    color: #1a4c3e;
}

/* About View Styling */
.about-content {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem 0;
}

.about-section-personal {
    margin-bottom: 3rem;
    padding: 2.5rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    border-left: 4px solid #45b883;
}

.creator-info {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.creator-photo {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #45b883;
    box-shadow: 0 4px 15px rgba(69, 184, 131, 0.3);
}

.creator-details h3 {
    margin: 0 0 1rem 0;
    color: #2d5f4f;
    font-size: 1.5rem;
    font-weight: 600;
}

.creator-details p {
    color: #495057;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    font-size: 1.05rem;
}

.linkedin-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #0077b5;
    text-decoration: none;
    font-weight: 600;
    padding: 0.75rem 1.25rem;
    border: 2px solid #0077b5;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.linkedin-link:hover {
    background: #0077b5;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 119, 181, 0.3);
}

.about-section-simple {
    margin-bottom: 3rem;
    padding: 2rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border-left: 4px solid #45b883;
}

.about-section-simple h3 {
    margin: 0 0 1.5rem 0;
    color: #2d5f4f;
    font-size: 1.3rem;
    font-weight: 600;
    border-bottom: 2px solid #f8f9fa;
    padding-bottom: 0.5rem;
}

.about-section-simple h4 {
    color: #2d5f4f;
    margin: 1.5rem 0 0.75rem 0;
    font-size: 1.05rem;
    font-weight: 600;
}

.about-section-simple h4:first-of-type {
    margin-top: 0;
}

.about-section-simple p {
    color: #495057;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.about-section-simple ul, .about-section-simple ol {
    color: #495057;
    line-height: 1.6;
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

.about-section-simple li {
    margin-bottom: 0.75rem;
}

.about-section-simple strong {
    color: #2d5f4f;
    font-weight: 600;
}

/* Mobile responsive about */
@media (max-width: 768px) {
    .about-content {
        padding: 1rem;
    }
    
    .about-section-personal {
        padding: 1.5rem;
        margin-bottom: 2rem;
    }
    
    .creator-info {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
    }
    
    .creator-photo {
        width: 100px;
        height: 100px;
    }
    
    .creator-details h3 {
        font-size: 1.3rem;
    }
    
    .about-section-simple {
        padding: 1.5rem;
        margin-bottom: 2rem;
    }
    
    .about-section-simple h3 {
        font-size: 1.2rem;
    }
}