:root {
    /* Color Palette */
    --primary-color: #4a6cf7;
    --secondary-color: #4ecdc4;
    --background-light: #f4f7f9;
    --text-dark: #2c3e50;
    --text-muted: #6c757d;
    --white: #ffffff;
    
    /* Gradients */
    --primary-gradient: linear-gradient(135deg, #4a6cf7, #7367f0);
    --secondary-gradient: linear-gradient(135deg, #4ecdc4, #45b7d1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--background-light);
    color: var(--text-dark);
    line-height: 1.6;
}

/* Navbar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 50px;
    background: white;
    box-shadow: var(--shadow-subtle);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    backdrop-filter: blur(10px);
    height: 50px;
}
 
.navbar-logo {
    font-size: 1.5em;
    font-weight: 800;
    background: var(--primary-gradient);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    text-decoration: none;
}
 
.navbar ul {
    display: flex;
    align-items: center;
    list-style: none;
    gap: 20px;
}
 
.navbar li a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    padding: 8px 15px;
    transition: color 0.3s ease;
}
 
.navbar li a:hover {
    color: #6a11cb;
}
 
.signup-btn {
    background: var(--primary-gradient);
    color: var(--white);
    padding: 10px 20px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    transition: transform 0.3s ease;
}
 
.signup-btn:hover {
    transform: translateY(-3px);
}
 

/* Hero Section */
.hero {
    background-image: url('/assets/images/voice wave.gif');
    background-color: var(--background-light);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: var(--text-primary);
    text-align: center;
    padding: 75px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-bottom-right-radius: 50px;
    border-bottom-left-radius: 50px; 
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.gradient-text {
    background: linear-gradient(to right, red, blue);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
}

.hero p {
    color: var(--text-muted);
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-cta {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.btn-primary, .btn-secondary {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background: var(--primary-gradient);
    color: var(--white);
}

.btn-secondary {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

/* Grouping Section */
.grouping-section {
    display: flex;
    gap: 2rem;
    padding: 2rem 5%;
    background-color: var(--white);
}

.input-container, .result-container {
    flex: 1;
    background-color: var(--background-light);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

.input-header, .result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

#inputNotes {
    width: 100%;
    min-height: 300px;
    padding: 1rem;
    border: 2px dashed var(--primary-color);
    border-radius: 8px;
    resize: vertical;
    background-color: var(--white);
}

.input-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
}

.result-actions {
    display: flex;
    gap: 1rem;
}

.grouped-insights {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
}

.group-card {
    background-color: var(--white);
    border-radius: 8px;
    padding: 1rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.group-card h3 {
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.group-card ul {
    list-style-type: none;
}

.group-card li {
    padding: 0.25rem 0;
    border-bottom: 1px solid var(--background-light);
}

.group-card li:last-child {
    border-bottom: none;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(168, 168, 168, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.loading-content {
    text-align: center;
    transform: translateY(-50px);
    opacity: 0;
    transition: all 0.5s ease;
    background-color: rgb(247, 239, 239);
    padding: 2rem;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0,0,0,0.2);
    max-width: 400px;
    width: 90%;

}

.loading-overlay.active .loading-content {
    transform: translateY(0);
    opacity: 1;
}

.loading-spinner-container {
    position: relative;
    width: 150px;
    height: 150px;
    margin: 0 auto 30px;
}

.loading-spinner {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 8px solid transparent;
    border-top-color: rgb(5, 3, 82);
    border-bottom-color: rgb(5, 3, 82);
    animation: spin 1.5s linear infinite;
}

.loading-spinner::before {
    content: '';
    position: absolute;
    top: 5px;
    left: 5px;
    right: 5px;
    bottom: 5px;
    border-radius: 50%;
    border: 6px solid transparent;
    border-top-color: #f1c500;
    border-bottom-color: #f1c500;
    animation: spin 1s linear reverse infinite;
}

.loading-spinner::after {
    content: '';
    position: absolute;
    top: 15px;
    left: 15px;
    right: 15px;
    bottom: 15px;
    border-radius: 50%;
    border: 4px solid transparent;
    border-top-color: rgb(1, 192, 218);
    border-bottom-color: rgb(1, 192, 218);
    animation: spin 0.75s linear infinite;
}

.loading-text {
    color: rgb(8, 8, 8);
    font-size: 1.5rem;
    font-weight: 300;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 20px;
}

.loading-subtext {
    color: rgba(0, 0, 0, 0.7);
    font-size: 1rem;
    margin-top: 15px;
}

.ai-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: pulse 2s infinite;
}

.ai-icon svg {
    width: 50px;
    height: 50px;
    fill: white;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .grouping-section {
        flex-direction: column;
    }
}

/* Utility Classes */
.btn-clear, .btn-sample, .btn-group, 
.btn-copy, .btn-download {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-clear, .btn-sample {
    background-color: var(--background-light);
    color: var(--text-muted);
}

.btn-group {
    background: var(--primary-gradient);
    color: var(--white);
}

.btn-copy, .btn-download {
    background-color: var(--background-light);
    color: var(--text-dark);
}

.error-message {
    color: #dc3545;
    text-align: center;
    padding: 1rem;
    background-color: rgba(220, 53, 69, 0.1);
    border-radius: 8px;
}

.placeholder-message {
    text-align: center;
    color: var(--text-muted);
    padding: 2rem;
}

.grouped-insights {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    max-height: 350px; 
    overflow-y: auto; 
    padding-right: 10px;
}
/* Custom scrollbar styling */
.grouped-insights::-webkit-scrollbar {
    width: 8px;
}
.grouped-insights::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}
.grouped-insights::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 10px;
    transition: background 0.3s ease;
}
.grouped-insights::-webkit-scrollbar-thumb:hover {
    background: #555;
}
.group-card {
    background-color: #f9f9f9;
    border-radius: 12px;
    padding: 20px;
    width: 100%;
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
    border: 1px solid #e6e6e6;
    transition: transform 0.3s ease;
    max-height: 400px; /* Limit individual group card height */

}
.group-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.1);
}
.group-title {
    position: sticky;
    top: 0;
    background-color: #f9f9f9;
    z-index: 10;
    margin-top: 0;
    margin-bottom: 15px;
    color: #2c3e50;
    font-size: 1.3em;
    font-weight: 600;
    border-bottom: 3px solid #3498db;
    padding-bottom: 10px;
    letter-spacing: 0.5px;
}
.group-items {
    list-style: none;
    padding: 0;
    margin: 0;
}
.group-items li {
    display: flex;
    align-items: flex-start;
    margin-bottom: 12px;
    line-height: 1.6;
    position: relative;
    padding-left: 20px;
}
.bullet-point {
    position: absolute;
    left: 0;
    top: 8px;
    width: 12px;
    height: 12px;
    background: linear-gradient(135deg, #3498db, #2980b9);
    border-radius: 50%;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    transform: scale(1);
    transition: all 0.3s ease;
}
.group-items li:hover .bullet-point {
    transform: scale(1.3);
    background: linear-gradient(135deg, #e74c3c, #c0392b);
}
.item-text {
    flex-grow: 1;
    color: #34495e;
    font-weight: 400;
    transition: color 0.3s ease;
}
.group-items li:hover .item-text {
    color: #2c3e50;
    font-weight: 500;
}
@media (max-width: 600px) {
    .grouped-insights {
        max-height: 400px;
    }
    .group-card {
        padding: 15px;
        max-height: 350px;
    }
    .bullet-point {
        width: 10px;
        height: 10px;
    }
}
/* Enhanced icon styling */
.result-actions {
    display: flex;
    gap: 12px;
}

.btn-copy, .btn-download {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    border-radius: 6px;
    border: none;
    background: #f5f5f5;
    transition: all 0.2s ease;
    cursor: pointer;
    color: #333;
    font-weight: 500;
}

/* Icon styles */
.btn-copy i, .btn-download i {
    font-size: 18px;
    margin-right: 4px;
    transition: transform 0.2s ease;
}

/* Hover effects */
.btn-copy:hover, .btn-download:hover {
    background: #e0e0e0;
    transform: translateY(-2px);
    box-shadow: 0 3px 8px rgba(0,0,0,0.1);
}

.btn-copy:hover i, .btn-download:hover i {
    transform: scale(1.2);
    color: #4361ee;
}

/* Active state */
.btn-copy:active, .btn-download:active {
    transform: translateY(1px);
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* Add labels for better UX */
.btn-copy::after {
    content: "Copy";
    margin-left: 4px;
    font-size: 14px;
}

.btn-download::after {
    content: "Download";
    margin-left: 4px;
    font-size: 14px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .btn-copy::after, .btn-download::after {
        display: none; /* Hide text on smaller screens */
    }
    
    .btn-copy, .btn-download {
        padding: 10px;
    }
    
    .btn-copy i, .btn-download i {
        margin-right: 0;
        font-size: 20px;
    }
}