/* ==========================================================================
   PROMPT OPTIMIZER - REIMAGINED STYLES
   --------------------------------------------------------------------------
   This stylesheet combines the aesthetic of the "Prompt Builder"
   with the structure of the "Prompt Optimizer" for a unified,
   modern look.
   ========================================================================== */

/* ==========================================================================
   1. CSS VARIABLES & GLOBAL SETTINGS
   ========================================================================== */
   

.modal-content {
    background-color: #0D0C1D!important;
   
}
.profile-menu.show {
    background-color: #eb7113 !important;
}

.profile-item.logout {
    color:white!important;
}

.profile-icon, .submit-icon{
    padding: 10px!important;
}

/* ==========================================================================
   4. NAVIGATION (Adapted from Prompt Builder)
   ========================================================================== */
.nav-container {
  position: sticky;
  top: 0;
  z-index: 50; /* Main nav bar z-index */
  background: var(--glass-background);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.nav-content {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1rem;
  display: flex;
  /* justify-content: space-between; */ /* Let flexbox handle spacing now */
  align-items: center;
  height: 4rem; /* Keep desktop height */
}

/* Base state - mobile first */
.nav-links {
  display: none; /* Hidden on mobile by default (handled by media query later) */
}

.auth-buttons {
  display: none; /* Hidden on mobile by default (handled by media query later) */
}

/* Navigation Links (General Styling) */
.nav-link { /* Applies to top-level links and dropdown toggles */
  padding: 0.5rem 0.75rem; /* Adjusted padding */
  color: var(--text-color);
  text-decoration: none;
  border-radius: 0.375rem; /* Slightly smaller radius */
  transition: background-color var(--transition-speed), color var(--transition-speed);
  white-space: nowrap;
  display: inline-flex; /* Helps align icon if added */
  align-items: center; /* Helps align icon if added */
  position: relative; /* For potential pseudo-elements if needed */
  z-index: 1; /* Ensure links are clickable above any potential background elements within parent */
}

.nav-link:hover {
  background-color: var(--glass-background-hover);
  color: var(--text-color); /* Ensure text stays white */
}

/* Active state for nav links (including dropdown toggles if needed) */
.nav-link.active {
    background-color: rgba(255, 255, 255, 0.2); /* Example active style */
    /* Add other active styles if desired, like font-weight */
}


/* --- START: Desktop Dropdown Styles (Revised for Robust Hover) --- */

/* The parent container for a dropdown item */
/* In your HTML, this should wrap both the toggle and the menu */
/* e.g., <div class="nav-item nav-dropdown"> ... </div> */
.nav-item.nav-dropdown {
  position: relative; /* Crucial: Establishes positioning context for the absolute menu */
  display: inline-block; /* Or flex, depending on how you structure items */
}

/* The link/button that triggers the dropdown */
.nav-dropdown-toggle {
  cursor: pointer;
  /* Inherits .nav-link styles */
}

/* The arrow icon */
.dropdown-arrow {
  margin-left: 0.4em;
  font-size: 0.7em;
  transition: transform var(--transition-speed) ease;
  display: inline-block; /* Prevents pushing text down */
  vertical-align: middle; /* Align with text better */
}

/* The dropdown menu itself */
.nav-dropdown-menu {
  display: block; /* Or 'flex' if you need flex properties for the menu layout */
  position: absolute;
  top: 100%; /* Position below the parent .nav-item */
  left: 0;
  z-index: 1000; /* High z-index to appear above other content */
  min-width: 200px; /* Minimum width */
  padding: 0.5rem 0;
  background: #0D0C1D; /* Custom background */
  backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 0.5rem;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);

  /* --- Visibility Control --- */
  opacity: 0; /* Start fully transparent */
  visibility: hidden; /* Start hidden from accessibility tree and rendering */
  transform: translateY(5px); /* Start slightly lower (adjust px as desired) */
  pointer-events: none; /* Prevent interaction when hidden */
  transition: opacity var(--transition-speed) ease,
              visibility var(--transition-speed) ease, /* transition visibility *instantly* with opacity */
              transform var(--transition-speed) ease;
}

/* ---- The KEY HOVER RULE ---- */
/* Show dropdown menu when the PARENT container is hovered */
.nav-item.nav-dropdown:hover > .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0); /* Move back to original position */
  pointer-events: auto; /* Allow interaction */
}

/* Rotate arrow when the PARENT container is hovered */
.nav-item.nav-dropdown:hover > .nav-dropdown-toggle .dropdown-arrow {
    transform: rotate(180deg);
}

/* Individual items within the dropdown menu */
.nav-dropdown-item {
  display: block;
  padding: 0.6rem 1.2rem; /* Generous padding */
  color: var(--text-color);
  text-decoration: none;
  font-size: 0.9rem;
  white-space: nowrap;
  background-color: transparent; /* Ensure no background by default */
  border: 0;
  transition: background-color var(--transition-speed), color var(--transition-speed);
}

.nav-dropdown-item:hover,
.nav-dropdown-item:focus, /* Add focus style for accessibility */
.nav-dropdown-item.active /* Style for active item within dropdown */ {
  background-color: var(--secondary-color); /* Use secondary color for hover/focus/active */
  color: var(--text-color);
  text-decoration: none; /* Ensure no underline appears on hover if not desired */
}
/* --- END: Desktop Dropdown Styles --- */


/* Mobile Menu Button */
.mobile-menu-button {
  display: block; /* Show by default, hide on desktop via media query */
  background: none;
  border: none;
  color: var(--text-color);
  padding: 0.5rem;
  cursor: pointer;
  transition: opacity var(--transition-speed);
  z-index: 51; /* Above mobile menu background */
}

.mobile-menu-button:hover {
  opacity: 0.8;
}

/* Mobile Menu Panel */
.mobile-menu {
  display: none; /* Hidden by default */
  position: fixed;
  /* Adjusted top based on nav height in media queries */
  left: 0;
  right: 0;
  background: #0D0C1D;
  backdrop-filter: blur(12px); /* Increased blur */
  padding: 1rem 0; /* Adjusted padding */
  /* Max height set in media queries */
  overflow-y: auto; /* Allow scrolling if needed */
  transform: translateY(-100%); /* Start hidden above */
  transition: transform var(--transition-speed) ease-out;
  z-index: 49; /* Below navbar container */
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.mobile-menu.active {
  transform: translateY(0);
  display: block;
}

/* Mobile menu general link styling */
.mobile-menu .nav-link:not(.sub-link), /* Target top-level links */
.mobile-menu .mobile-submenu-toggle { /* And the toggle button */
  display: block;
  padding: 0.9rem 1.5rem; /* Adjusted padding */
  text-align: left; /* Align text left */
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  text-decoration: none;
  font-size: 1rem;
  width: 100%; /* Ensure full width */
  box-sizing: border-box; /* Include padding in width */
  color: var(--text-color);
}

/* Style last top-level item before auth buttons */
.mobile-menu > *:not(.mobile-menu-section):not(.auth-buttons-mobile):last-of-type {
    border-bottom: none;
}
/* Remove bottom border from last mobile menu section */
.mobile-menu .mobile-menu-section:last-of-type > .mobile-submenu-toggle {
    border-bottom: none;
}


/* --- NEW: Mobile Submenu Styles --- */
.mobile-menu-section {
    /* Container for a toggle + submenu block */
}

.mobile-submenu-toggle {
    background: none;
    border: none;
    cursor: pointer;
    display: flex; /* Use flex to align text and icon */
    justify-content: space-between; /* Push icon to the right */
    align-items: center;
    /* Inherits padding, font-size etc from the rule above */
}

.mobile-submenu-toggle .dropdown-arrow {
    transition: transform var(--transition-speed) ease;
    font-size: 0.9em; /* Adjust arrow size */
}

/* Toggle active state (assuming JS adds 'active' class or similar) */
/* You might need JS to add this class when expanded */
.mobile-submenu-toggle[aria-expanded="true"] .dropdown-arrow {
     transform: rotate(180deg);
}

.mobile-submenu {
    background-color: rgba(0, 0, 0, 0.1); /* Slight indent background */
    /* display: none; */ /* JS handles display: block/none */
    padding-left: 0; /* Remove padding, handled by sub-links */
    overflow: hidden; /* Helps with animations if added later */
    max-height: 0; /* Start height at 0 for transition */
    transition: max-height 0.3s ease-out; /* Animate height */
}

.mobile-submenu .sub-link {
    display: block;
    padding: 0.75rem 1.5rem 0.75rem 2.5rem; /* Indented padding */
    text-align: left;
    font-size: 0.9rem; /* Slightly smaller */
    color: rgba(255, 255, 255, 0.9); /* Slightly dimmer text */
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    text-decoration: none;
}

.mobile-submenu .sub-link:last-child {
    border-bottom: none; /* Remove border from last sub-item */
}

.mobile-submenu .sub-link:hover,
.mobile-submenu .sub-link.active /* Style active mobile sublink */ {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--text-color);
}
/* --- END: Mobile Submenu Styles --- */


/* Style separator before mobile auth buttons */
.mobile-menu .auth-buttons-mobile {
  border-top: 1px solid rgba(255, 255, 255, 0.2); /* Use top border for separation */
  padding-top: 1.5rem; /* Add space above buttons */
  margin-top: 1rem; /* Add space below last link/section */
  padding-left: 1.5rem;
  padding-right: 1.5rem;
  padding-bottom: 1rem;
}

/* Logo Styling */
.nav-logo-link {
    display: inline-flex; /* Use flex to help center image if needed */
    align-items: center;
    height: 100%; /* Make link take full nav height for easier clicking */
    padding: 0.25rem 0; /* Add slight vertical padding */
    margin-right: 1rem; /* Space between logo and next item (adjusted in media queries) */
}

.nav-logo-img {
    height: 32px; /* Default height (adjust as needed, maybe match original?) */
    width: auto;   /* Maintain aspect ratio */
    max-height: calc(100% - 0.5rem); /* Ensure it fits within padding */
    transition: height var(--transition-speed) ease; /* Smooth transition */
    display: block; /* Remove extra space below image */
}
/* Mobile menu general link styling */
.mobile-menu .nav-link:not(.sub-link), /* Target top-level links */
.mobile-menu .mobile-submenu-toggle { /* And the toggle button */
  display: block;
  padding: 0.9rem 1.5rem; /* Adjusted padding */
  text-align: left; /* Align text left */
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  text-decoration: none;
  font-size: 1rem;
  width: 100%; /* Ensure full width */
  box-sizing: border-box; /* Include padding in width */
  color: var(--text-color);
}



/* Mobile Menu Button */
.mobile-menu-button {
  display: block; /* Show by default, hide on desktop via media query */
  background: none;
  border: none;
  color: var(--text-color);
  padding: 0.5rem;
  cursor: pointer;
  transition: opacity var(--transition-speed);
  z-index: 51; /* Above mobile menu background */
}

.mobile-menu-button:hover {
  opacity: 0.8;
}

.button {
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  border: none;
  cursor: pointer;
  transition: all var(--transition-speed);
  font-weight: 500;
  display: inline-flex; /* Align icon and text */
  align-items: center;
  justify-content: center;
  text-align: center; /* Ensure text is centered */
}

.button-primary {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-color);
  border: 1px solid transparent; /* Add transparent border for consistency */
}

.button-primary:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.3);
}

.button-outline {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--text-color);
}

.button-outline:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.3);
}

/* Mobile Menu Buttons */
.auth-buttons-mobile {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(80px, 1fr)); /* More flexible columns */
  gap: 0.75rem;
}

.mobile-menu .button {
  width: 100%;
  padding: 0.75rem 0.5rem;
  font-size: 1rem;
}

.mobile-menu .button-primary {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.mobile-menu .button-primary:hover {
  background: rgba(255, 255, 255, 0.25);
}

.mobile-menu .button-outline {
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: transparent;
}

.mobile-menu .button-outline:hover {
  background: rgba(255, 255, 255, 0.1);
}


/* ==========================================================================
   10. FOOTER & MISC
   ========================================================================== */
.footer {
  background: var(--surface-glass);
  backdrop-filter: blur(5px);
  padding: 4rem 0 0;
  margin-top: 4rem;
  border-top: 1px solid var(--border-glass);
}

.footer-container { max-width: 1280px; margin: 0 auto; padding: 0 2rem; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 3rem; margin-bottom: 4rem; }
.footer-section h4 { font-size: 1.1rem; font-weight: 600; margin-bottom: 1.5rem; color: var(--text-headings); }
.footer-description { color: var(--text-secondary); margin-bottom: 1.5rem; line-height: 1.6; }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: 0.75rem; }
.footer-links a { color: var(--text-secondary); }
.footer-links a:hover { color: var(--text-primary); }

.social-links { display: flex; gap: 1rem; }
.social-link { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; background: var(--surface-glass-hover); color: var(--text-primary); transition: all var(--transition-speed); }
.social-link:hover { background: var(--accent-primary); transform: translateY(-2px); }

.footer-bottom { border-top: 1px solid var(--border-glass); padding: 2rem 0; margin-top: 2rem; }
.footer-bottom-content { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem; }
.footer-bottom p { margin: 0; color: var(--text-secondary); }
.footer-bottom-links { display: flex; gap: 2rem; }
.footer-bottom-links a { color: var(--text-secondary); }
.footer-bottom-links a:hover { color: var(--text-primary); }

/* --- Find and Replace this entire rule --- */
.seo-section {
  /* --- NEW: Centering and width constraints --- */
  max-width: 960px; /* Gives the section a maximum width */
  margin: 3rem auto;  /* Centers the section horizontally (top/bottom | left/right) */
  
  /* --- Existing Styles (Unchanged) --- */
  background: var(--surface-glass);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  box-shadow: 0 10px 30px -15px rgba(0,0,0,0.2);
  padding: 2.5rem;
  color: var(--text-primary);
  transition: box-shadow var(--transition-speed), transform var(--transition-speed);
}
.seo-section:hover {
  box-shadow: 0 12px 32px rgba(0,0,0,0.18);
  transform: translateY(-2px);
}

.seo-section h2 { font-size: 1.75rem; margin-bottom: 1rem; }
.seo-section p { color: var(--text-secondary); font-size: 1.1rem; margin-bottom: 1.5rem; }
.seo-section ul { list-style: none; margin: 0; padding: 0; }
.seo-section li { position: relative; padding-left: 2rem; margin-bottom: 1rem; color: var(--text-secondary); font-size: 1.05rem; }
.seo-section li::before { content: '✔'; position: absolute; left: 0; top: 0; color: var(--accent-primary); font-weight: 700; font-size: 1.1rem; line-height: 1.5; }

/* TOAST / NOTIFICATIONS */
.toast-container { position: fixed; bottom: 2rem; right: 2rem; z-index: 1000; }
.toast { background: var(--surface-glass-hover); backdrop-filter: blur(10px); border-radius: var(--radius-md); padding: 1rem 1.5rem; margin-bottom: 1rem; display: flex; align-items: center; gap: 1rem; box-shadow: 0 8px 25px -8px rgba(0,0,0,0.3); animation: slideInToast 0.3s ease-out; min-width: 300px; color: var(--text-primary); border-left: 4px solid transparent; }
@keyframes slideInToast { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
.toast-icon { font-size: 1.25rem; }
.toast-success { border-left-color: var(--success-color); } .toast-success .toast-icon { color: var(--success-color); }
.toast-error { border-left-color: var(--error-color); } .toast-error .toast-icon { color: var(--error-color); }
.toast-info { border-left-color: var(--accent-primary); } .toast-info .toast-icon { color: var(--accent-primary); }

/* ==========================================================================
   11. RESPONSIVE DESIGN
   ========================================================================== */
@media (max-width: 640px) {
  .hero-title { font-size: 2.25rem; }
  .hero-description { font-size: 1rem; }
  .content-card { padding: 1.5rem; }
  .seo-section { padding: 1.5rem; }
  .seo-section h2 { font-size: 1.5rem; }
  .step-line { width: 50px; }
  .goals-grid { grid-template-columns: 1fr; }
  .score-container { flex-direction: column; text-align: center; }
  .score-circle { width: 100px; height: 100px; font-size: 2.5rem; }
}

@media (max-width: 768px) {
  .footer-grid { gap: 2rem; }
  .footer-bottom-content { flex-direction: column; text-align: center; }
  .footer-bottom-links { justify-content: center; }
  .footer-container { padding: 0 1rem; }
}

@media (max-width: 859px) {
  .nav-links, .auth-buttons { display: none; }
  .mobile-menu-button { display: block; margin-left: auto; }
  .mobile-menu { top: 4rem; max-height: calc(100vh - 4rem); }
  .nav-logo-img { height: 28px; }
  .nav-logo-link { margin-right: 0.5rem; }
}

@media (min-width: 860px) {
  .mobile-menu-button { display: none; }
  .mobile-menu { display: none !important; }
  .nav-links { display: flex; gap: 0.5rem; align-items: center; margin-left: 1rem; margin-right: auto; }
  .nav-link { font-size: 0.9rem; }
  .auth-buttons { display: flex; gap: 0.5rem; align-items: center; margin-left: 1rem; }
}

@media (min-width: 1024px) {
  .nav-links { gap: 1rem; }
  .nav-link { padding: 0.5rem 1rem; font-size: 0.95rem; }
  .auth-buttons { gap: 0.75rem; }
  .button { padding: 0.6rem 1.2rem; font-size: 0.95rem; }
}

/* ==========================================================================
   7. BANNER
   ========================================================================== */
.banner-container {
  width: 100%;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  position: relative;
  overflow: hidden;
}

.banner-content {
  margin: 0 auto;
  position: relative;
  z-index: 10;
}

.banner-link {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0.75rem;
  text-decoration: none;
  color: var(--text-color);
  background: var(--glass-background);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  text-align: center;
  font-size: 0.875rem;
  transition: opacity 0.3s ease;
}

.banner-link:hover {
  opacity: 0.9;
  color: var(--text-color);
}
:root {
            --primary: #6366F1;
            --primary-hover: #5558E8;
            --secondary: #8B5CF6;
            --success: #10B981;
            --warning: #F59E0B;
            --error: #EF4444;
            --bg-primary: #0F172A;
            --bg-secondary: #1E293B;
            --bg-tertiary: #334155;
            --text-primary: #F1F5F9;
            --text-secondary: #CBD5E1;
            --text-light: #94A3B8;
            --border: #334155;
            --gradient-start: #6366F1;
            --gradient-end: #8B5CF6;
        }

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
            background: var(--bg-primary);
            color: var(--text-primary);
            min-height: 100vh;
            overflow-x: hidden;
        }

        h1.hero-title {
                font-size: clamp(2.5rem, 8vw, 4rem);
    font-weight: 800;
    letter-spacing: -0.025em;
    margin: 0;
    background: linear-gradient(135deg, #FFFFFF 30%, #A78BFA 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
        }
        /* Hero Section */
        .hero {
            background: #0D0C1D;
            padding: 3rem 0;
            margin-bottom: 2rem;
            
        }

        .hero-title {
            font-size: 2.5rem;
            font-weight: 700;
            margin-bottom: 1rem;
            text-align: center;
            
           
        }

        .hero-description {
            font-size: 1.25rem;
            text-align: center;
            color: rgba(255, 255, 255, 0.9);
            max-width: 800px;
            margin: 0 auto;
        }

        .container {
            display: grid;
            grid-template-columns: 320px 1fr 320px;
            gap: 2rem;
            padding: 2rem;
            max-width: 1440px;
            margin: 0 auto;
            min-height: calc(100vh - 80px);
        }

        .card {
            background: var(--bg-secondary);
            border: 1px solid var(--border);
            border-radius: 12px;
            padding: 1.5rem;
            backdrop-filter: blur(10px);
            transition: all 0.3s ease;
            height: fit-content;
        }

        .card:hover {
            border-color: var(--primary);
            transform: translateY(-2px);
            box-shadow: 0 8px 32px rgba(99, 102, 241, 0.1);
        }

        .card-title {
            font-size: 18px;
            font-weight: 600;
            margin-bottom: 1rem;
            color: var(--text-primary);
        }

        /* Left Column - Frameworks */
        .frameworks-grid {
            display: grid;
            gap: 0.75rem;
            margin-bottom: 2rem;
        }

        .framework-btn {
            background: var(--bg-tertiary);
            border: 1px solid var(--border);
            border-radius: 8px;
            padding: 12px 16px;
            color: var(--text-primary);
            font-weight: 500;
            cursor: pointer;
            transition: all 0.3s ease;
            text-align: left;
            font-size: 14px;
            position: relative;
        }

        .framework-btn:hover {
            background: var(--primary);
            border-color: var(--primary);
            transform: scale(1.02);
            box-shadow: 0 4px 20px rgba(99, 102, 241, 0.3);
        }

        .framework-btn.active {
            background: var(--primary);
            border-color: var(--primary);
            box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.5);
        }

        .framework-btn.active::after {
            content: '✓';
            position: absolute;
            right: 12px;
            top: 50%;
            transform: translateY(-50%);
            font-weight: bold;
        }

        .techniques-grid {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 0.5rem;
        }

        .technique-btn {
            background: var(--bg-tertiary);
            border: 1px solid var(--border);
            border-radius: 6px;
            padding: 8px 12px;
            color: var(--text-secondary);
            font-size: 12px;
            cursor: pointer;
            transition: all 0.3s ease;
            text-align: center;
            position: relative;
        }

        .technique-btn:hover {
            background: var(--primary);
            border-color: var(--primary);
            color: white;
        }

        .technique-btn.active {
            background: var(--primary);
            border-color: var(--primary);
            color: white;
        }

        .technique-btn.active::after {
            content: '✓';
            position: absolute;
            right: 4px;
            top: 2px;
            font-size: 10px;
            font-weight: bold;
        }

        /* Middle Column - Core Interaction */
        .goal-section {
            margin-bottom: 2rem;
        }

        .goal-textarea {
            width: 100%;
            height: 200px;
            background: var(--bg-tertiary);
            border: 2px solid var(--border);
            border-radius: 8px;
            padding: 1rem;
            color: var(--text-primary);
            font-family: inherit;
            font-size: 16px;
            line-height: 1.5;
            resize: vertical;
            transition: border-color 0.3s ease;
        }

        .goal-textarea:focus {
            outline: none;
            border-color: var(--primary);
            box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
        }

        .goal-textarea::placeholder {
            color: var(--text-light);
        }

        /* Custom Instructions Section */
        .custom-instructions-section {
            margin: 1.5rem 0;
            padding: 1rem;
            background: var(--bg-tertiary);
            border: 1px solid var(--border);
            border-radius: 8px;
            transition: all 0.3s ease;
        }

        .custom-instructions-section:hover {
            border-color: var(--primary);
        }

        .custom-instructions-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 0.75rem;
        }

        .custom-instructions-title {
            font-size: 14px;
            font-weight: 600;
            color: var(--text-primary);
            margin: 0;
        }

        .advanced-badge {
            background: linear-gradient(45deg, #FF6B6B, #FF8E53);
            color: white;
            padding: 2px 8px;
            border-radius: 12px;
            font-size: 10px;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }

        .custom-instructions-textarea {
            width: 100%;
            height: 120px;
            background: var(--bg-secondary);
            border: 1px solid var(--border);
            border-radius: 6px;
            padding: 0.75rem;
            color: var(--text-primary);
            font-family: inherit;
            font-size: 14px;
            line-height: 1.4;
            resize: vertical;
            transition: border-color 0.3s ease;
        }

        .custom-instructions-textarea:focus {
            outline: none;
            border-color: var(--primary);
            box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.3);
        }

        .custom-instructions-textarea::placeholder {
            color: var(--text-light);
            font-size: 13px;
        }

        .custom-instructions-info {
            background: rgba(255, 215, 0, 0.1);
            border: 1px solid rgba(255, 215, 0, 0.3);
            border-radius: 4px;
            padding: 0.5rem;
            margin-top: 0.5rem;
            font-size: 11px;
            color: #FFE066;
            line-height: 1.3;
        }

        .prompt-builder-info {
            background: var(--bg-tertiary);
            border-radius: 6px;
            padding: 0.75rem;
            margin-top: 0.5rem;
            font-size: 12px;
            color: var(--text-secondary);
        }

        .action-buttons {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 1rem;
            margin-bottom: 2rem;
        }

        .action-btn {
            background: linear-gradient(45deg, var(--primary), var(--secondary));
            border: none;
            border-radius: 8px;
            padding: 12px 20px;
            color: white;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s ease;
            font-size: 14px;
            min-height: 48px;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .action-btn:hover:not(:disabled) {
            transform: translateY(-2px);
            box-shadow: 0 6px 25px rgba(99, 102, 241, 0.4);
        }

        .action-btn:active {
            transform: translateY(0);
        }

        .action-btn:disabled {
            opacity: 0.6;
            cursor: not-allowed;
        }

        .output-section {
            background: var(--bg-tertiary);
            border-radius: 8px;
            padding: 1rem;
            min-height: 150px;
            border: 1px solid var(--border);
        }

        .output-content {
            color: var(--text-secondary);
            font-size: 14px;
            line-height: 1.6;
        }

        .output-content h1, .output-content h2, .output-content h3 {
            color: var(--text-primary);
            margin: 1rem 0 0.5rem 0;
        }

        .output-content p {
            margin-bottom: 0.75rem;
        }

        .output-content ul, .output-content ol {
            margin: 0.5rem 0;
            padding-left: 1.5rem;
        }

        .output-content li {
            margin-bottom: 0.25rem;
        }

        .output-content strong {
            color: var(--text-primary);
        }

        .output-content code {
            background: var(--bg-secondary);
            padding: 2px 4px;
            border-radius: 3px;
            font-family: 'Monaco', 'Menlo', monospace;
        }

        .output-content pre {
            background: var(--bg-secondary);
            padding: 1rem;
            border-radius: 6px;
            overflow-x: auto;
            margin: 0.75rem 0;
        }

        /* Right Column - Quality Score */
        .score-display {
            text-align: center;
            margin-bottom: 2rem;
        }

        .score-circle {
            width: 120px;
            height: 120px;
            border-radius: 50%;
            background: conic-gradient(from 0deg, #FF0055 0%, var(--primary) 50%, #00D0FF 100%);
            margin: 0 auto 1rem;
            display: flex;
            align-items: center;
            justify-content: center;
            position: relative;
        }

        .score-circle::before {
            content: '';
            width: 100px;
            height: 100px;
            background: var(--bg-secondary);
            border-radius: 50%;
            position: absolute;
        }

        .score-number {
            font-size: 32px;
            font-weight: 700;
            z-index: 1;
            position: relative;
        }

        .score-label {
            color: var(--text-secondary);
            font-size: 14px;
            margin-bottom: 1rem;
        }

        .metrics-grid {
            display: grid;
            gap: 1rem;
        }

        .metric {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 0.5rem 0;
            border-bottom: 1px solid var(--border);
        }

        .metric:last-child {
            border-bottom: none;
        }

        .metric-name {
            color: var(--text-secondary);
            font-size: 13px;
        }

        .metric-value {
            color: var(--text-primary);
            font-weight: 600;
            font-size: 13px;
        }

        .history-section {
            position: fixed;
            bottom: 0;
            left: 0;
            right: 0;
            background: var(--bg-secondary);
            backdrop-filter: blur(10px);
            border-top: 1px solid var(--border);
            padding: 1rem 2rem;
            transform: translateY(100%);
            transition: transform 0.3s ease;
            z-index: 50;
        }

        .history-section.expanded {
            transform: translateY(0);
        }

        .history-toggle {
            background: none;
            border: none;
            color: var(--primary);
            cursor: pointer;
            font-size: 14px;
            margin-bottom: 1rem;
            display: block;
            width: 100%;
            text-align: center;
        }

        .history-items {
            display: flex;
            gap: 1rem;
            overflow-x: auto;
            padding-bottom: 0.5rem;
        }

        .history-item {
            background: var(--bg-tertiary);
            border-radius: 6px;
            padding: 0.75rem;
            min-width: 200px;
            flex-shrink: 0;
            border: 1px solid var(--border);
            cursor: pointer;
            transition: all 0.3s ease;
        }

        .history-item:hover {
            border-color: var(--primary);
            transform: translateY(-2px);
        }

        .history-preview {
            color: var(--text-secondary);
            font-size: 12px;
            line-height: 1.4;
            overflow: hidden;
            display: -webkit-box;
            -webkit-line-clamp: 3;
            -webkit-box-orient: vertical;
        }

        /* Mobile Responsive Design */
        @media (max-width: 1024px) {
            .container {
                grid-template-columns: 1fr;
                gap: 1rem;
                padding: 1rem;
            }
            
            .card {
                padding: 1rem;
            }

            .hero {
                padding: 2rem 1rem;
            }

            .hero-title {
                font-size: 1.75rem;
            }

            .hero-description {
                font-size: 1rem;
            }

            .custom-instructions-section {
                margin: 1rem 0;
                padding: 0.75rem;
            }

            .custom-instructions-textarea {
                height: 100px;
            }
        }

        @media (max-width: 768px) {
            .action-buttons {
                grid-template-columns: 1fr;
                gap: 0.75rem;
            }
            
            .techniques-grid {
                grid-template-columns: 1fr;
            }

            .frameworks-grid {
                gap: 0.5rem;
            }

            .framework-btn, .technique-btn {
                font-size: 13px;
                padding: 10px 12px;
            }

            .goal-textarea {
                height: 150px;
                font-size: 16px;
            }

            .custom-instructions-textarea {
                height: 80px;
                font-size: 16px;
            }

            .score-circle {
                width: 100px;
                height: 100px;
            }

            .score-circle::before {
                width: 80px;
                height: 80px;
            }

            .score-number {
                font-size: 24px;
            }

            .custom-instructions-header {
                flex-direction: column;
                align-items: flex-start;
                gap: 0.5rem;
            }
        }

        @media (max-width: 480px) {
            .container {
                padding: 0.5rem;
                gap: 0.75rem;
            }

            .card {
                padding: 0.75rem;
            }

            .card-title {
                font-size: 16px;
            }

            .techniques-grid {
                grid-template-columns: 1fr 1fr;
                gap: 0.375rem;
            }

            .technique-btn {
                padding: 8px 6px;
                font-size: 11px;
            }

            .custom-instructions-section {
                padding: 0.5rem;
            }

            .custom-instructions-title {
                font-size: 13px;
            }

            .advanced-badge {
                font-size: 9px;
                padding: 1px 6px;
            }
        }

        .pulse {
            animation: pulse 2s infinite;
        }

        @keyframes pulse {
            0% { opacity: 1; }
            50% { opacity: 0.7; }
            100% { opacity: 1; }
        }

        .loading {
            display: inline-block;
            width: 16px;
            height: 16px;
            border: 2px solid rgba(255, 255, 255, 0.3);
            border-radius: 50%;
            border-top-color: white;
            animation: spin 1s ease-in-out infinite;
            margin-right: 8px;
        }

        @keyframes spin {
            to { transform: rotate(360deg); }
        }

        .error-message {
            color: #FF6B6B;
            background: rgba(255, 107, 107, 0.1);
            border: 1px solid rgba(255, 107, 107, 0.3);
            border-radius: 6px;
            padding: 0.75rem;
            margin-top: 0.5rem;
            font-size: 14px;
        }

        .success-message {
            color: #4ECDC4;
            background: rgba(78, 205, 196, 0.1);
            border: 1px solid rgba(78, 205, 196, 0.3);
            border-radius: 6px;
            padding: 0.75rem;
            margin-top: 0.5rem;
            font-size: 14px;
        }

        /* Toast styles */
        .toast-container {
            position: fixed;
            top: 1rem;
            right: 1rem;
            z-index: 1000;
        }

        .toast {
            background: var(--bg-secondary);
            border: 1px solid var(--border);
            border-radius: 8px;
            padding: 1rem;
            margin-bottom: 0.5rem;
            min-width: 250px;
            box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
            animation: slideIn 0.3s ease-out;
        }

        @keyframes slideIn {
            from { transform: translateX(100%); opacity: 0; }
            to { transform: translateX(0); opacity: 1; }
        }

        .toast-success {
            border-color: var(--success);
        }

        .toast-error {
            border-color: var(--error);
        }

        .toast-info {
            border-color: var(--primary);
        }

        /* Modal styles */
        .modal {
            position: fixed;
            z-index: 1000;
            left: 0;
            top: 0;
            width: 100%;
            height: 100%;
            background-color: rgba(0,0,0,0.5);
            display: none;
        }
        
        .modal-content {
            background-color: var(--bg-secondary);
            margin: 15% auto;
            padding: 2rem;
            border: 1px solid var(--border);
            border-radius: 12px;
            width: 80%;
            max-width: 500px;
            position: relative;
            box-shadow: 0 4px 6px rgba(0,0,0,0.1);
        }
        
        .close {
            color: var(--text-light);
            float: right;
            font-size: 28px;
            font-weight: bold;
            cursor: pointer;
        }
        
        .close:hover,
        .close:focus {
            color: var(--text-primary);
            text-decoration: none;
        }
        
        .modal h2 {
            margin-bottom: 1rem;
            color: var(--text-primary);
        }
        
        .modal p {
            margin-bottom: 1.5rem;
            color: var(--text-secondary);
        }

        .button-group {
            display: flex;
            gap: 1rem;
            justify-content: center;
        }

        .button {
            padding: 0.75rem 1.5rem;
            border-radius: 8px;
            font-weight: 600;
            text-decoration: none;
            transition: all 0.3s ease;
            cursor: pointer;
            
            font-size: 14px;
        }

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

        .button-primary:hover {
            background: var(--primary-hover);
        }

        .button-secondary {
            background: var(--bg-tertiary);
            color: var(--text-primary);
        }

        .button-secondary:hover {
            background: var(--border);
        }

        /* SEO Section */
        .seo-section {
            background: var(--bg-secondary);
            padding: 3rem 0;
            margin-top: 3rem;
            border-top: 1px solid var(--border);
        }

        .seo-section h2 {
            font-size: 2rem;
            margin-bottom: 1rem;
            color: var(--text-primary);
        }

        .seo-section p {
            font-size: 1.125rem;
            line-height: 1.8;
            color: var(--text-secondary);
            margin-bottom: 1rem;
        }

        .seo-section ul {
            list-style: none;
            padding: 0;
        }

        .seo-section li {
            padding: 0.5rem 0;
            padding-left: 1.5rem;
            position: relative;
            color: var(--text-secondary);
        }

        .seo-section li::before {
            content: "✓";
            position: absolute;
            left: 0;
            color: var(--success);
        }