/* Base Styles */
:root {
    --primary-color: #2c3e50;
    --secondary-color: orange;
    --accent-color: #e74c3c;
    --light-gray: #ecf0f1;
    --dark-gray: #2c3e50;
    --text-color: #333;
    --text-light: #7f8c8d;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-color);
    background-color: #f5f7fa;
    line-height: 1.6;
    padding-bottom: 50px;
}

/* Top Bar */
.top-bar {
    background-color: var(--dark-gray);
    color: white;
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.hamburger-menu {
    margin-right: 1.5rem;
    font-size: 1.5rem;
    cursor: pointer;
}

.top-bar h1 {
    font-size: 1.5rem;
    font-weight: 500;
}

/* Main Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.section {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.section h2 {
    margin-bottom: 1.5rem;
    color: var(--primary-color);
    font-weight: 600;
    border-bottom: 2px solid var(--light-gray);
    padding-bottom: 0.5rem;
}

/* Textareas */
textarea {
    width: 100%;
    padding: 1rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-family: inherit;
    font-size: 1rem;
    resize: vertical;
    min-height: 120px;
    margin-bottom: 1rem;
    transition: border 0.3s;
}

textarea:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

/* Buttons */
button {
    background-color: var(--secondary-color);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 500;
}

button:hover {
    background-color: var(--accent-color);
    transform: translateY(-1px);
}

button:active {
    transform: translateY(0);
}

button:disabled {
    background-color: #95a5a6;
    cursor: not-allowed;
}

#analyzeBtn, #submitBtn {
    background-color: var(--primary-color);
}

#editBtn {
    background-color: #27ae60;
    margin-right: 1rem;
}

/* Techniques Grid */
.techniques-grid {
    display: block;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.technique-card {
    background-color: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 1.5rem;
    transition: all 0.3s;
}

/*
.technique-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}
*/

.technique-card.active {
    border: 2px solid var(--secondary-color);
    background-color: #f8fafc;
}

.technique-card h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.technique-card .description {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    min-height: 40px;
}

.technique-card .improvements {
    margin: 1rem 0;
    font-size: 0.9rem;
}

.technique-card .improvements p {
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
}

.technique-card .improvements i {
    margin-right: 0.5rem;
    color: #27ae60;
}

.technique-card .apply-btn {
    width: 100%;
    margin-top: 0.5rem;
    padding: 0.5rem;
    font-size: 0.9rem;
}

/* Optimized Prompt Controls */
.controls {
    display: flex;
    justify-content: flex-end;
}

/* Model Response */
#responseContainer {
    min-height: 200px;
    border: 1px dashed #ddd;
    border-radius: 6px;
    padding: 1rem;
    background-color: #f9f9f9;
}

.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--text-light);
}

.loading i {
    margin-right: 0.5rem;
    font-size: 1.2rem;
}

.error {
    color: var(--accent-color);
    padding: 1rem;
}

.response-success {
    background-color: white;
    border-radius: 6px;
    padding: 1rem;
}

.response-header {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.response-header i {
    font-size: 1.5rem;
    margin-right: 0.75rem;
}

.response-header h3 {
    font-weight: 600;
}

.response-content {
    line-height: 1.7;
    margin-bottom: 1rem;
}

.response-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--text-light);
    border-top: 1px solid #eee;
    padding-top: 0.75rem;
}

.response-meta i {
    margin-right: 0.3rem;
}

.response-controls {
    display: flex;
    justify-content: space-between;
    margin-top: 1rem;
}

#refineBtn {
    background-color: #f39c12;
}

#newPromptBtn {
    background-color: #95a5a6;
}

/* Debug Console 
.debug-console {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #1e1e1e;
    color: #f0f0f0;
    padding: 10px;
    border-top: 2px solid #444;
    font-family: monospace;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
}

.debug-console h3 {
    color: #fff;
    margin: 0 0 10px 0;
    display: flex;
    justify-content: space-between;
}

#debugOutput {
    font-size: 12px;
    line-height: 1.4;
}

.debug-entry {
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid #333;
}

.debug-time {
    color: #4ec9b0;
}

.debug-entry pre {
    background: #252525;
    padding: 5px;
    margin: 5px 0 0 0;
    border-radius: 3px;
    overflow-x: auto;
}

#clearDebug {
    background: #555;
    border: none;
    color: white;
    padding: 2px 8px;
    border-radius: 3px;
    cursor: pointer;
}
*/

/* Add to existing CSS */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    color: var(--text-light);
}

.loading i {
    margin-right: 0.75rem;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    100% { transform: rotate(360deg); }
}

.response-success {
    background-color: white;
    border-radius: 6px;
    padding: 1.5rem;
    margin-top: 1rem;
}

.response-header {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.response-header i {
    font-size: 1.5rem;
    margin-right: 0.75rem;
    color: var(--secondary-color);
}

.response-content {
    line-height: 1.7;
}

.response-meta {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--light-gray);
    color: var(--text-light);
    font-size: 0.9rem;
}

.technique-badge {
    background-color: var(--secondary-color);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    margin-left: 1rem;
}

/* Add to existing CSS */
.quota-error {
    background-color: #fff8e6;
    border-left: 4px solid #ffc107;
    padding: 1.5rem;
    margin: 1rem 0;
}

.quota-error h3 {
    color: #ff9800;
    margin-bottom: 1rem;
}

.quota-actions {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #ffe0b2;
}

.quota-actions ul {
    margin: 0.5rem 0 0 1.5rem;
}

.quota-actions li {
    margin-bottom: 0.5rem;
}

.quota-actions a {
    color: var(--secondary-color);
    text-decoration: underline;
}

/*
body.debug .techniques-grid, body.debug .grid {
    border: 2px dashed white !important;
}
*/

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }
    
    .techniques-grid .grid {
        grid-template-columns: 1fr;
    }
    
    .controls {
        flex-direction: column;
    }
    
    #editBtn {
        margin-right: 0;
        margin-bottom: 1rem;
    }
}

