/* Import base styles */
@import url('style.css');

/* Casio FX-580VNX Tricks Specific Styles */
.casio-fx580vnx-container {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 50%, #3b82f6 100%);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 25px 50px rgba(0,0,0,0.4);
    margin: 20px 0;
    position: relative;
    overflow: hidden;
}

.casio-fx580vnx-container::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="casio-pattern" width="40" height="40" patternUnits="userSpaceOnUse"><text x="20" y="25" font-family="monospace" font-size="14" fill="rgba(255,255,255,0.03)" text-anchor="middle">FX</text><text x="5" y="15" font-family="monospace" font-size="10" fill="rgba(255,255,255,0.02)" text-anchor="middle">580</text><text x="35" y="35" font-family="monospace" font-size="8" fill="rgba(255,255,255,0.02)" text-anchor="middle">VNX</text></pattern></defs><rect width="100" height="100" fill="url(%23casio-pattern)"/></svg>');
    pointer-events: none;
}

/* Method Navigator */
.method-navigator {
    display: flex;
    gap: 8px;
    margin-bottom: 25px;
    background: rgba(255,255,255,0.15);
    border-radius: 15px;
    padding: 8px;
    backdrop-filter: blur(15px);
    overflow-x: auto;
}

.method-btn {
    background: transparent;
    border: none;
    padding: 14px 18px;
    color: rgba(255,255,255,0.9);
    cursor: pointer;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.3s ease;
    white-space: nowrap;
    flex: 1;
    min-width: 120px;
    text-align: center;
}

.method-btn:hover {
    background: rgba(255,255,255,0.2);
    color: white;
    transform: translateY(-2px);
}

.method-btn.active {
    background: linear-gradient(135deg, #1e3c72, #2a5298);
    color: white;
    box-shadow: 0 6px 20px rgba(30, 60, 114, 0.4);
}

/* Method Sections */
.method-section {
    display: none;
    background: rgba(255,255,255,0.98);
    border-radius: 15px;
    padding: 30px;
    backdrop-filter: blur(15px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.2);
    position: relative;
    z-index: 1;
}

.method-section.active {
    display: block;
    animation: slideInUp 0.6s ease-out;
}

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

.method-section h3 {
    color: #1e3c72;
    margin-bottom: 25px;
    font-size: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Calculator Panel */
.calculator-panel {
    background: white;
    border-radius: 15px;
    padding: 25px;
    border: 2px solid #e9ecef;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.panel {
    width: 100%;
    border-collapse: collapse;
}

.panel td {
    padding: 12px;
    vertical-align: middle;
    border-bottom: 1px solid #f1f3f4;
}

.panel td:first-child {
    font-weight: 700;
    color: #1e3c72;
    width: 30%;
    text-align: right;
    padding-right: 20px;
}

.innormal {
    width: 100%;
    padding: 12px;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #495057;
    transition: all 0.3s ease;
    background: white;
}

.innormal:focus {
    border-color: #1e3c72;
    outline: none;
    box-shadow: 0 0 0 3px rgba(30, 60, 114, 0.1);
}

.range-input {
    width: 80px;
    padding: 8px;
    border: 2px solid #dee2e6;
    border-radius: 6px;
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    color: #495057;
    margin: 0 5px;
    transition: all 0.3s ease;
}

.range-input:focus {
    border-color: #1e3c72;
    outline: none;
    box-shadow: 0 0 0 3px rgba(30, 60, 114, 0.1);
}

.step-input {
    width: 100px;
    padding: 8px;
    border: 2px solid #dee2e6;
    border-radius: 6px;
    text-align: center;
    font-size: 13px;
    margin-left: 10px;
    transition: all 0.3s ease;
}

.complex-input {
    width: 80px;
    padding: 8px;
    border: 2px solid #dee2e6;
    border-radius: 6px;
    text-align: center;
    font-size: 13px;
    margin: 0 5px;
    transition: all 0.3s ease;
}

.coeff-input {
    width: 60px;
    padding: 8px;
    border: 2px solid #dee2e6;
    border-radius: 6px;
    text-align: center;
    font-size: 13px;
    margin: 0 5px;
    transition: all 0.3s ease;
}

.data-textarea {
    width: 100%;
    height: 80px;
    padding: 12px;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    font-size: 14px;
    font-family: 'Courier New', monospace;
    resize: vertical;
    transition: all 0.3s ease;
}

.data-textarea:focus {
    border-color: #1e3c72;
    outline: none;
    box-shadow: 0 0 0 3px rgba(30, 60, 114, 0.1);
}

/* Button Styles */
.solve-btn {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    margin: 2px;
}

.solve-btn:hover {
    background: linear-gradient(135deg, #218838, #1ea080);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4);
}

.guide-btn {
    background: linear-gradient(135deg, #17a2b8, #138496);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    margin: 2px;
}

.guide-btn:hover {
    background: linear-gradient(135deg, #138496, #117a8b);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(23, 162, 184, 0.4);
}

.example-btn {
    background: linear-gradient(135deg, #ffc107, #e0a800);
    color: #212529;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    margin: 2px;
}

.example-btn:hover {
    background: linear-gradient(135deg, #e0a800, #d39e00);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 193, 7, 0.4);
}

.clear-btn {
    background: linear-gradient(135deg, #dc3545, #c82333);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    margin: 2px;
}

.clear-btn:hover {
    background: linear-gradient(135deg, #c82333, #bd2130);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(220, 53, 69, 0.4);
}

.find-btn {
    background: linear-gradient(135deg, #6f42c1, #5a32a3);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    margin: 2px;
}

.find-btn:hover {
    background: linear-gradient(135deg, #5a32a3, #4c2a85);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(111, 66, 193, 0.4);
}

.check-btn {
    background: linear-gradient(135deg, #fd7e14, #e8590c);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    margin: 2px;
}

.check-btn:hover {
    background: linear-gradient(135deg, #e8590c, #d5480a);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(253, 126, 20, 0.4);
}

.graph-btn {
    background: linear-gradient(135deg, #e83e8c, #d91a72);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    margin: 2px;
}

.graph-btn:hover {
    background: linear-gradient(135deg, #d91a72, #c21765);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(232, 62, 140, 0.4);
}

.sort-btn {
    background: linear-gradient(135deg, #6c757d, #5a6268);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    margin: 2px;
}

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

.domain-btn {
    background: linear-gradient(135deg, #20c997, #17a2b8);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    margin: 2px;
}

.domain-btn:hover {
    background: linear-gradient(135deg, #17a2b8, #138496);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(32, 201, 151, 0.4);
}

.convert-btn {
    background: linear-gradient(135deg, #fd7e14, #e8590c);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    margin: 2px;
}

.convert-btn:hover {
    background: linear-gradient(135deg, #e8590c, #d5480a);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(253, 126, 20, 0.4);
}

.load-program-btn {
    background: linear-gradient(135deg, #6f42c1, #5a32a3);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 12px;
    margin-top: 10px;
}

.load-program-btn:hover {
    background: linear-gradient(135deg, #5a32a3, #4c2a85);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(111, 66, 193, 0.4);
}

.demo-btn {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 11px;
    margin-top: 8px;
}

.demo-btn:hover {
    background: linear-gradient(135deg, #20c997, #17a2b8);
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.4);
}

/* Sub-navigation Styles */
.solve-types, .system-types, .geometry-types, .trick-categories, .technique-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    background: #f8f9fa;
    border-radius: 10px;
    padding: 8px;
    overflow-x: auto;
}

.solve-type-btn, .sys-type-btn, .geo-type-btn, .trick-cat-btn, .tech-tab-btn {
    background: white;
    border: 2px solid #dee2e6;
    padding: 10px 16px;
    color: #495057;
    cursor: pointer;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.3s ease;
    white-space: nowrap;
    flex: 1;
    text-align: center;
}

.solve-type-btn:hover, .sys-type-btn:hover, .geo-type-btn:hover, .trick-cat-btn:hover, .tech-tab-btn:hover {
    border-color: #1e3c72;
    background: #e8f4fd;
    color: #1e3c72;
    transform: translateY(-1px);
}

.solve-type-btn.active, .sys-type-btn.active, .geo-type-btn.active, .trick-cat-btn.active, .tech-tab-btn.active {
    background: linear-gradient(135deg, #1e3c72, #2a5298);
    color: white;
    border-color: #1e3c72;
    box-shadow: 0 4px 15px rgba(30, 60, 114, 0.3);
}

/* Content Sections */
.solve-content, .system-content, .geometry-content, .trick-content, .technique-content {
    display: none;
}

.solve-content.active, .system-content.active, .geometry-content.active, .trick-content.active, .technique-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

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

/* Casio Steps */
.casio-steps {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 25px;
    margin-top: 20px;
    border-left: 5px solid #1e3c72;
}

.casio-steps h4 {
    color: #1e3c72;
    margin-bottom: 20px;
    font-size: 18px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.step-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.step-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: white;
    border-radius: 10px;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
}

.step-item:hover {
    border-color: #1e3c72;
    transform: translateX(5px);
}

.step-number {
    background: linear-gradient(135deg, #1e3c72, #2a5298);
    color: white;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
    flex-shrink: 0;
}

.step-content {
    flex: 1;
    color: #495057;
    font-weight: 600;
    font-size: 14px;
    line-height: 1.5;
}

/* Table Styles */
.value-table {
    margin-top: 20px;
}

.value-table h4 {
    color: #1e3c72;
    margin-bottom: 15px;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.table-container {
    max-height: 300px;
    overflow-y: auto;
    border-radius: 10px;
    border: 2px solid #e9ecef;
}

.results-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

.results-table th {
    background: linear-gradient(135deg, #1e3c72, #2a5298);
    color: white;
    padding: 12px;
    text-align: center;
    font-weight: 700;
    font-size: 14px;
    position: sticky;
    top: 0;
    z-index: 10;
}

.results-table td {
    padding: 10px;
    text-align: center;
    border-bottom: 1px solid #e9ecef;
    font-size: 13px;
    font-family: 'Courier New', monospace;
}

.results-table tbody tr:hover {
    background: #f8f9fa;
}

.no-data {
    color: #6c757d;
    font-style: italic;
    padding: 20px !important;
}

/* Graph Display */
.graph-display {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 20px;
    margin-top: 20px;
    text-align: center;
    border: 2px solid #e9ecef;
}

#graph-canvas {
    border: 2px solid #dee2e6;
    border-radius: 10px;
    background: white;
    margin-bottom: 15px;
}

.graph-info {
    color: #6c757d;
    font-size: 14px;
    font-style: italic;
}

/* Tricks Grid */
.tricks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.trick-item {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.trick-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(30, 60, 114, 0.1), transparent);
    transition: left 0.5s ease;
}

.trick-item:hover::before {
    left: 100%;
}

.trick-item:hover {
    border-color: #1e3c72;
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
}

.trick-title {
    font-weight: 700;
    color: #1e3c72;
    font-size: 16px;
    margin-bottom: 10px;
}

.trick-keys {
    background: linear-gradient(135deg, #1e3c72, #2a5298);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    font-weight: 700;
    margin: 10px 0;
    display: inline-block;
}

.trick-desc {
    color: #6c757d;
    font-size: 13px;
    line-height: 1.5;
    margin-bottom: 15px;
}

/* Memory Guide */
.memory-guide {
    display: flex;
    flex-direction: column;
    gap: 25px;
    margin-top: 20px;
}

.memory-section {
    background: white;
    border-radius: 15px;
    padding: 20px;
    border-left: 5px solid #1e3c72;
}

.memory-section h5 {
    color: #1e3c72;
    margin-bottom: 15px;
    font-size: 16px;
    font-weight: 700;
}

.memory-operations {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.memory-op {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.memory-op:hover {
    background: #e8f4fd;
    transform: translateX(5px);
}

.op-key {
    background: linear-gradient(135deg, #1e3c72, #2a5298);
    color: white;
    padding: 6px 12px;
    border-radius: 15px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    font-weight: 700;
    min-width: 80px;
    text-align: center;
}

.op-desc {
    flex: 1;
    color: #495057;
    font-size: 13px;
    font-weight: 600;
}

/* Special Functions */
.special-functions {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 20px;
}

.function-category {
    background: white;
    border-radius: 15px;
    padding: 20px;
    border-left: 5px solid #1e3c72;
}

.function-category h5 {
    color: #1e3c72;
    margin-bottom: 15px;
    font-size: 16px;
    font-weight: 700;
}

.function-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.function-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 8px;
    background: #f8f9fa;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.function-item:hover {
    background: #e8f4fd;
    transform: translateX(3px);
}

.func-name {
    background: linear-gradient(135deg, #1e3c72, #2a5298);
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
    font-family: 'Courier New', monospace;
    font-size: 11px;
    font-weight: 700;
    min-width: 70px;
    text-align: center;
}

.func-desc {
    flex: 1;
    color: #495057;
    font-size: 12px;
    font-weight: 600;
}

/* Settings Guide */
.settings-guide {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 20px;
}

.setting-section {
    background: white;
    border-radius: 15px;
    padding: 20px;
    border-left: 5px solid #1e3c72;
}

.setting-section h5 {
    color: #1e3c72;
    margin-bottom: 15px;
    font-size: 16px;
    font-weight: 700;
}

.setting-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.setting-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.setting-item:hover {
    background: #e8f4fd;
    transform: translateX(5px);
}

.setting-key {
    background: linear-gradient(135deg, #1e3c72, #2a5298);
    color: white;
    padding: 6px 12px;
    border-radius: 15px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    font-weight: 700;
    min-width: 120px;
    text-align: center;
}

.setting-desc {
    flex: 1;
    color: #495057;
    font-size: 13px;
    font-weight: 600;
}

/* Programming Guide */
.programming-guide {
    margin-top: 20px;
}

.program-example {
    background: white;
    border-radius: 15px;
    padding: 20px;
    border-left: 5px solid #1e3c72;
}

.program-example h5 {
    color: #1e3c72;
    margin-bottom: 15px;
    font-size: 16px;
    font-weight: 700;
}

.code-block {
    background: #2d3748;
    color: #e2e8f0;
    border-radius: 10px;
    padding: 20px;
    margin: 15px 0;
    overflow-x: auto;
}

.code-block pre {
    margin: 0;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    line-height: 1.6;
    white-space: pre-wrap;
}

/* Right Panel Enhancements */
.result-container {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.result-display {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.solution-info, .solution-values, .solution-details {
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
    border-left: 4px solid #1e3c72;
}

.result-label {
    font-weight: 700;
    color: #1e3c72;
    font-size: 14px;
    margin-bottom: 10px;
}

.equation-text {
    font-family: 'Courier New', monospace;
    font-size: 16px;
    color: #495057;
    background: white;
    padding: 10px;
    border-radius: 6px;
    border: 1px solid #dee2e6;
}

.solution-container {
    background: white;
    border-radius: 8px;
    padding: 15px;
    border: 1px solid #dee2e6;
}

.no-solution {
    color: #6c757d;
    font-style: italic;
    text-align: center;
    padding: 20px;
}

.details-text p {
    margin: 8px 0;
    color: #495057;
    font-size: 14px;
}

.details-text strong {
    color: #1e3c72;
    font-weight: 700;
}

.details-text span {
    font-family: 'Courier New', monospace;
    font-weight: 600;
}

/* Casio Guide Panel */
.casio-guide-panel {
    background: rgba(255,255,255,0.95);
    border-radius: 15px;
    padding: 25px;
    margin: 20px 0;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.casio-guide-panel h3 {
    color: #1e3c72;
    margin-bottom: 20px;
    font-size: 18px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.guide-steps {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.guide-step {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: white;
    border-radius: 10px;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
}

.guide-step:hover {
    border-color: #1e3c72;
    transform: translateX(5px);
}

.step-icon {
    font-size: 24px;
    width: 40px;
    text-align: center;
    flex-shrink: 0;
}

.step-instruction {
    flex: 1;
    font-size: 14px;
    color: #495057;
    line-height: 1.5;
}

.step-instruction strong {
    color: #1e3c72;
    font-weight: 700;
    display: block;
    margin-bottom: 4px;
}

.step-instruction small {
    color: #6c757d;
    font-size: 12px;
}

/* Quick Examples */
.quick-examples {
    background: rgba(255,255,255,0.95);
    border-radius: 15px;
    padding: 25px;
    margin: 20px 0;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.quick-examples h3 {
    color: #1e3c72;
    margin-bottom: 20px;
    font-size: 18px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.example-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.example-item {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.example-item:hover {
    border-color: #1e3c72;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
}

.example-title {
    font-weight: 700;
    color: #1e3c72;
    font-size: 14px;
    margin-bottom: 8px;
}

.example-equation {
    font-family: 'Courier New', monospace;
    color: #495057;
    font-size: 13px;
    margin: 8px 0;
    background: #f8f9fa;
    padding: 6px;
    border-radius: 4px;
}

.example-solution {
    color: #28a745;
    font-size: 12px;
    font-weight: 600;
    font-family: 'Courier New', monospace;
}

/* Function Reference */
.function-reference {
    background: rgba(255,255,255,0.95);
    border-radius: 15px;
    padding: 25px;
    margin: 20px 0;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.function-reference h3 {
    color: #1e3c72;
    margin-bottom: 20px;
    font-size: 18px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.function-categories {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.function-reference .function-category {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    border-left: 4px solid #1e3c72;
}

.function-reference .function-category h4 {
    color: #1e3c72;
    margin-bottom: 15px;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.function-reference .function-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.function-reference .function-item {
    background: white;
    padding: 10px;
    border-radius: 6px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 15px;
}

.function-reference .function-item:hover {
    background: #e8f4fd;
    transform: translateX(3px);
}

.func-syntax {
    background: linear-gradient(135deg, #1e3c72, #2a5298);
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    font-weight: 700;
    min-width: 80px;
    text-align: center;
}

.func-desc {
    flex: 1;
    color: #495057;
    font-size: 13px;
    font-weight: 600;
}

/* Troubleshooting */
.troubleshooting {
    background: linear-gradient(135deg, #f8d7da, #f5c6cb);
    border-radius: 15px;
    padding: 25px;
    margin: 20px 0;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.troubleshooting h3 {
    color: #dc3545;
    margin-bottom: 20px;
    font-size: 18px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.trouble-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.trouble-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: rgba(255,255,255,0.8);
    border-radius: 10px;
    transition: all 0.3s ease;
}

.trouble-item:hover {
    background: white;
    transform: translateX(5px);
}

.trouble-icon {
    font-size: 24px;
    width: 40px;
    text-align: center;
    flex-shrink: 0;
}

.trouble-content {
    flex: 1;
    font-size: 14px;
    color: #495057;
    line-height: 1.5;
}

.trouble-content strong {
    color: #dc3545;
    font-weight: 700;
}

/* Tips Advanced */
.tips-advanced {
    background: linear-gradient(135deg, #e8f5e8, #d4edda);
    border-radius: 15px;
    padding: 25px;
    margin: 20px 0;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.tips-advanced h3 {
    color: #28a745;
    margin-bottom: 20px;
    font-size: 18px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.tips-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.tip-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: rgba(255,255,255,0.8);
    border-radius: 10px;
    transition: all 0.3s ease;
}

.tip-item:hover {
    background: white;
    transform: translateX(5px);
}

.tip-icon {
    font-size: 24px;
    width: 40px;
    text-align: center;
    flex-shrink: 0;
}

.tip-content {
    flex: 1;
    font-size: 14px;
    color: #495057;
    line-height: 1.5;
}

.tip-content strong {
    color: #28a745;
    font-weight: 700;
}

/* Comprehensive Guide */
.comprehensive-guide {
    margin: 30px 0;
}

.comprehensive-guide h3 {
    color: #2b7ddb;
    margin-bottom: 15px;
    font-size: 22px;
}

.comprehensive-guide h4 {
    color: #1e3c72;
    margin: 20px 0 10px 0;
    font-size: 18px;
}

.comprehensive-guide p {
    color: #495057;
    line-height: 1.7;
    margin: 15px 0;
    text-align: justify;
}

.comprehensive-guide ul {
    margin: 10px 0;
    padding-left: 20px;
}

.comprehensive-guide li {
    margin: 10px 0;
    line-height: 1.6;
    color: #6c757d;
}

.comprehensive-guide strong {
    color: #1e3c72;
    font-weight: 700;
}

/* FAQ Section Enhancements */
.faq-section {
    margin: 30px 0;
}

.faq-section h4 {
    color: #2b7ddb;
    margin-top: 25px;
    margin-bottom: 12px;
    font-size: 16px;
}

.faq-section p {
    margin: 12px 0;
    text-align: justify;
    line-height: 1.7;
    color: #6c757d;
}

/* Responsive Design */
@media screen and (max-width: 768px) {
    .casio-fx580vnx-container {
        padding: 20px;
    }

    .method-navigator {
        flex-direction: column;
        gap: 8px;
    }

    .method-btn {
        min-width: auto;
        padding: 12px 15px;
        font-size: 12px;
    }

    .method-section {
        padding: 20px;
    }

    .method-section h3 {
        font-size: 20px;
    }

    .calculator-panel {
        padding: 20px;
    }

    .panel td {
        padding: 8px;
        display: block;
        width: 100%;
    }

    .panel td:first-child {
        text-align: left;
        padding-right: 8px;
        margin-bottom: 5px;
        font-size: 14px;
    }

    .innormal {
        padding: 10px;
        font-size: 13px;
    }

    .range-input {
        width: 60px;
        padding: 6px;
        font-size: 12px;
    }

    .step-input, .complex-input, .coeff-input {
        width: 60px;
        padding: 6px;
        font-size: 12px;
    }

    .data-textarea {
        height: 60px;
        padding: 10px;
        font-size: 13px;
    }

    .solve-btn, .guide-btn, .example-btn, .clear-btn, .find-btn, .check-btn, .graph-btn, .sort-btn, .domain-btn, .convert-btn {
        padding: 10px 20px;
        font-size: 13px;
        margin: 2px;
    }

    .solve-types, .system-types, .geometry-types, .trick-categories, .technique-tabs {
        flex-direction: column;
        gap: 8px;
    }

    .solve-type-btn, .sys-type-btn, .geo-type-btn, .trick-cat-btn, .tech-tab-btn {
        padding: 8px 12px;
        font-size: 12px;
    }

    .casio-steps {
        padding: 20px;
    }

    .step-item {
        padding: 12px;
        gap: 12px;
    }

    .step-number {
        width: 30px;
        height: 30px;
        font-size: 14px;
    }

    .step-content {
        font-size: 13px;
    }

    .table-container {
        max-height: 200px;
    }

    .results-table th, .results-table td {
        padding: 8px;
        font-size: 12px;
    }

    #graph-canvas {
        width: 100%;
        height: 200px;
    }

    .tricks-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .trick-item {
        padding: 15px;
    }

    .trick-title {
        font-size: 14px;
    }

    .trick-keys {
        padding: 6px 12px;
        font-size: 12px;
    }

    .trick-desc {
        font-size: 12px;
    }

    .demo-btn {
        padding: 6px 12px;
        font-size: 10px;
    }

    .memory-guide, .special-functions, .settings-guide {
        gap: 20px;
    }

    .memory-section, .function-category, .setting-section {
        padding: 15px;
    }

    .memory-op, .function-item, .setting-item {
        padding: 8px;
        gap: 10px;
    }

    .op-key, .func-name, .setting-key {
        padding: 4px 8px;
        font-size: 10px;
        min-width: 60px;
    }

    .op-desc, .func-desc, .setting-desc {
        font-size: 12px;
    }

    .program-example {
        padding: 15px;
    }

    .code-block {
        padding: 15px;
    }

    .code-block pre {
        font-size: 10px;
    }

    .load-program-btn {
        padding: 8px 16px;
        font-size: 11px;
    }

    .example-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .example-item {
        padding: 12px;
    }

    .example-title {
        font-size: 13px;
    }

    .example-equation {
        font-size: 12px;
        padding: 4px;
    }

    .example-solution {
        font-size: 11px;
    }

    .guide-step {
        padding: 12px;
        gap: 12px;
    }

    .step-icon {
        font-size: 20px;
        width: 30px;
    }

    .step-instruction {
        font-size: 13px;
    }

    .step-instruction small {
        font-size: 11px;
    }

    .function-reference .function-category {
        padding: 15px;
    }

    .function-reference .function-item {
        padding: 8px;
        gap: 10px;
    }

    .func-syntax {
        padding: 3px 8px;
        font-size: 10px;
        min-width: 60px;
    }

    .func-desc {
        font-size: 12px;
    }

    .trouble-item, .tip-item {
        padding: 12px;
        gap: 12px;
    }

    .trouble-icon, .tip-icon {
        font-size: 20px;
        width: 30px;
    }

    .trouble-content, .tip-content {
        font-size: 13px;
    }
}

@media screen and (max-width: 480px) {
    .casio-fx580vnx-container {
        padding: 15px;
    }

    .method-navigator {
        padding: 5px;
    }

    .method-btn {
        padding: 10px 12px;
        font-size: 11px;
    }

    .method-section {
        padding: 15px;
    }

    .method-section h3 {
        font-size: 18px;
    }

    .calculator-panel {
        padding: 15px;
    }

    .panel td {
        padding: 6px;
    }

    .panel td:first-child {
        font-size: 13px;
    }

    .innormal {
        padding: 8px;
        font-size: 12px;
    }

    .range-input {
        width: 50px;
        padding: 4px;
        font-size: 11px;
    }

    .step-input, .complex-input, .coeff-input {
        width: 50px;
        padding: 4px;
        font-size: 11px;
    }

    .data-textarea {
        height: 50px;
        padding: 8px;
        font-size: 12px;
    }

    .solve-btn, .guide-btn, .example-btn, .clear-btn, .find-btn, .check-btn, .graph-btn, .sort-btn, .domain-btn, .convert-btn {
        padding: 8px 16px;
        font-size: 12px;
    }

    .solve-type-btn, .sys-type-btn, .geo-type-btn, .trick-cat-btn, .tech-tab-btn {
        padding: 6px 10px;
        font-size: 11px;
    }

    .casio-steps {
        padding: 15px;
    }

    .step-item {
        padding: 10px;
        gap: 10px;
    }

    .step-number {
        width: 25px;
        height: 25px;
        font-size: 12px;
    }

    .step-content {
        font-size: 12px;
    }

    .table-container {
        max-height: 150px;
    }

    .results-table th, .results-table td {
        padding: 6px;
        font-size: 11px;
    }

    #graph-canvas {
        width: 100%;
        height: 150px;
    }

    .trick-item {
        padding: 12px;
    }

    .trick-title {
        font-size: 13px;
    }

    .trick-keys {
        padding: 4px 8px;
        font-size: 11px;
    }

    .trick-desc {
        font-size: 11px;
    }

    .demo-btn {
        padding: 4px 8px;
        font-size: 9px;
    }

    .memory-section, .function-category, .setting-section {
        padding: 12px;
    }

    .memory-op, .function-item, .setting-item {
        padding: 6px;
        gap: 8px;
    }

    .op-key, .func-name, .setting-key {
        padding: 3px 6px;
        font-size: 9px;
        min-width: 50px;
    }

    .op-desc, .func-desc, .setting-desc {
        font-size: 11px;
    }

    .program-example {
        padding: 12px;
    }

    .code-block {
        padding: 12px;
    }

    .code-block pre {
        font-size: 9px;
    }

    .load-program-btn {
        padding: 6px 12px;
        font-size: 10px;
    }

    .example-item {
        padding: 10px;
    }

    .example-title {
        font-size: 12px;
    }

    .example-equation {
        font-size: 11px;
        padding: 3px;
    }

    .example-solution {
        font-size: 10px;
    }

    .guide-step {
        padding: 10px;
        gap: 10px;
    }

    .step-icon {
        font-size: 18px;
        width: 25px;
    }

    .step-instruction {
        font-size: 12px;
    }

    .step-instruction small {
        font-size: 10px;
    }

    .function-reference .function-category {
        padding: 12px;
    }

    .function-reference .function-item {
        padding: 6px;
        gap: 8px;
    }

    .func-syntax {
        padding: 2px 6px;
        font-size: 9px;
        min-width: 50px;
    }

    .func-desc {
        font-size: 11px;
    }

    .trouble-item, .tip-item {
        padding: 10px;
        gap: 10px;
    }

    .trouble-icon, .tip-icon {
        font-size: 18px;
        width: 25px;
    }

    .trouble-content, .tip-content {
        font-size: 12px;
    }

    .result-container {
        padding: 20px;
    }

    .solution-info, .solution-values, .solution-details {
        padding: 12px;
    }

    .result-label {
        font-size: 13px;
    }

    .equation-text {
        font-size: 14px;
        padding: 8px;
    }

    .details-text p {
        font-size: 13px;
    }
}
