/* AURA Farmer - Panel Generator Styles */

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', 'RF Dewi', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
header {
    text-align: center;
    margin-bottom: 40px;
    padding: 30px 0;
    background: white;
    border-radius: 15px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 15px;
    width: 100%;
}

.aura-logo {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.aura-logo svg {
    display: block;
}

.logo {
    width: 60px;
    height: 60px;
    margin-bottom: 15px;
}

h1 {
    color: #666;
    font-size: 3rem;
    font-weight: 700;
    margin: 0;
    display: flex;
    align-items: center;
    text-align: center;
}

.subtitle {
    color: #666;
    font-size: 1.1rem;
    font-weight: 400;
}

/* GitHub link */
.github-link {
    margin-top: 15px;
}

.btn-github {
    background: #24292e;
    color: white;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    font-size: 14px;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.btn-github:hover {
    background: #1b1f23;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(36, 41, 46, 0.3);
}

.btn-github svg {
    flex-shrink: 0;
}

/* Main content */
main {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* Input section */
.input-section {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.input-group {
    margin-bottom: 25px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

textarea, input[type="text"] {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 16px;
    font-family: inherit;
    transition: border-color 0.3s ease;
    resize: vertical;
}

textarea:focus, input[type="text"]:focus {
    outline: none;
    border-color: #0096de;
    box-shadow: 0 0 0 3px rgba(0, 150, 222, 0.1);
}

.help-text {
    color: #666;
    font-size: 0.9rem;
    margin-top: 5px;
}

.controls {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.size-control {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 200px;
}

input[type="range"] {
    flex: 1;
    height: 6px;
    background: #e1e5e9;
    border-radius: 3px;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background: #0096de;
    cursor: pointer;
    border-radius: 50%;
}

input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: #0096de;
    cursor: pointer;
    border-radius: 50%;
    border: none;
}

#scale-value {
    font-weight: 600;
    color: #0096de;
    min-width: 60px;
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background: #0096de;
    color: white;
}

.btn-primary:hover {
    background: #007bb5;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 150, 222, 0.3);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(108, 117, 125, 0.3);
}

.btn-download {
    background: #28a745;
    color: white;
}

.btn-download:hover {
    background: #218838;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

.btn-clear {
    background: #dc3545;
    color: white;
}

.btn-clear:hover {
    background: #c82333;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

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

/* Batch section */
.batch-section {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.batch-section h3 {
    margin-bottom: 20px;
    color: #333;
}

.batch-controls {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Output section */
.output-section {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.output-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 15px;
}

.output-header h3 {
    color: #333;
    margin: 0;
}

.output-controls {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.panels-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    min-height: 100px;
}

.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px 20px;
    color: #666;
    background: #f8f9fa;
    border-radius: 10px;
    border: 2px dashed #dee2e6;
}

.empty-state p {
    margin-bottom: 10px;
}

/* Panel item */
.panel-item {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease;
}

.panel-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.panel-item svg {
    max-width: 100%;
    height: auto;
    margin-bottom: 15px;
    border-radius: 5px;
}

.panel-info {
    margin-bottom: 15px;
}

.panel-text {
    font-weight: 600;
    color: #333;
}

.panel-size {
    font-size: 0.9rem;
    color: #666;
}

.panel-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-small {
    padding: 6px 12px;
    font-size: 14px;
}

/* Footer */
footer {
    text-align: center;
    margin-top: 40px;
    padding: 20px;
    color: #666;
    font-size: 0.9rem;
}

footer .github-link {
    margin-top: 15px;
}

footer p {
    margin-bottom: 0;
}

/* Loading state */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #0096de;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Error messages */
.error-message {
    background: #f8d7da;
    color: #721c24;
    padding: 12px 15px;
    border-radius: 5px;
    margin: 10px 0;
    border: 1px solid #f5c6cb;
    white-space: pre;
}

.success-message {
    background: #d4edda;
    color: #155724;
    padding: 12px 15px;
    border-radius: 5px;
    margin: 10px 0;
    border: 1px solid #c3e6cb;
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    .controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .size-control {
        min-width: auto;
    }
    
    .output-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .output-controls {
        justify-content: center;
    }
    
    .panels-grid {
        grid-template-columns: 1fr;
    }
    
    .panel-actions {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        margin-bottom: 5px;
    }
    
    .header-content {
        flex-direction: column;
        gap: 15px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 10px;
    }
    
    header {
        padding: 20px 15px;
    }
    
    .input-section,
    .batch-section,
    .output-section {
        padding: 20px 15px;
    }
    
    h1 {
        font-size: 1.8rem;
    }
    
    .header-content {
        gap: 10px;
    }
    
    .aura-logo svg {
        width: 60px;
        height: 60px;
    }
}

/* Modal styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: white;
    border-radius: 15px;
    padding: 0;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.modal-overlay.show .modal-content {
    transform: scale(1);
}

.modal-header {
    padding: 25px 30px 0;
    border-bottom: 1px solid #e1e5e9;
}

.modal-header h3 {
    margin: 0 0 20px 0;
    color: #333;
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-body {
    padding: 25px 30px;
}

.modal-description {
    margin-bottom: 20px;
    color: #666;
    font-size: 1rem;
}

.modal-question {
    margin-top: 20px;
    margin-bottom: 0;
    color: #333;
    font-weight: 600;
}

.corrections-list {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    margin: 15px 0;
    border-left: 4px solid #0096de;
}

.correction-item {
    margin-bottom: 8px;
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
}

.correction-item:last-child {
    margin-bottom: 0;
}

.correction-original {
    color: #dc3545;
    text-decoration: line-through;
}

.correction-arrow {
    color: #0096de;
    margin: 0 8px;
    font-weight: bold;
}

.correction-fixed {
    color: #28a745;
    font-weight: 600;
}

.modal-actions {
    padding: 0 30px 30px;
    display: flex;
    gap: 15px;
    justify-content: flex-end;
}

.modal-actions .btn {
    min-width: 120px;
}

/* Modal responsive */
@media (max-width: 480px) {
    .modal-content {
        width: 95%;
        margin: 20px;
    }
    
    .modal-header,
    .modal-body,
    .modal-actions {
        padding-left: 20px;
        padding-right: 20px;
    }
    
    .modal-actions {
        flex-direction: column;
    }
    
    .modal-actions .btn {
        width: 100%;
    }
}

/* Print styles */
@media print {
    body {
        background: white;
    }
    
    .container {
        max-width: none;
        padding: 0;
    }
    
    header, footer {
        display: none;
    }
    
    .input-section, .batch-section {
        display: none;
    }
    
    .output-section {
        box-shadow: none;
        border: none;
        padding: 0;
    }
    
    .panels-grid {
        display: block;
    }
    
    .panel-item {
        break-inside: avoid;
        page-break-inside: avoid;
        margin-bottom: 20px;
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    .panel-actions {
        display: none;
    }
}