/* DDMT Maze Generator - Custom Styles */

/* Font Configuration */
body {
    font-family: 'Sarabun', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
}

/* Header Styling */
header h1 {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.maze-icon {
    display: inline-block;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

/* Program Information Card */
.program-info-card {
    border: none;
    border-left: 5px solid #667eea;
    background: linear-gradient(to right, #ffffff, #f8f9ff);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.program-info-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.15) !important;
}

.program-info-card .card-body {
    position: relative;
}

.program-info-card h2 {
    color: #667eea;
}

.program-info-card h3 {
    color: #6c757d;
    font-style: italic;
}

.program-details .badge {
    font-size: 0.9rem;
    padding: 0.5em 1em;
}

.contact-info {
    font-size: 0.95rem;
}

.contact-info a {
    color: #667eea;
    font-weight: 500;
}

.contact-info a:hover {
    color: #764ba2;
}

/* Generator Card */
.generator-card {
    border: none;
    border-radius: 15px;
    overflow: hidden;
}

.generator-card .card-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    border-bottom: none;
    padding: 1.25rem 1.5rem;
}

.generator-card .card-header h4 {
    font-weight: 600;
}

/* Form Controls */
.form-control-lg {
    border-radius: 10px;
    border: 2px solid #e9ecef;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-control-lg:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.25rem rgba(102, 126, 234, 0.25);
}

.input-group-text {
    border-radius: 10px 0 0 10px;
    border: 2px solid #e9ecef;
    border-right: none;
    background: #f8f9fa;
}

.input-group .form-control-lg {
    border-radius: 0 10px 10px 0;
}

.form-label {
    color: #495057;
    margin-bottom: 0.5rem;
}

.form-text {
    color: #6c757d;
    font-size: 0.85rem;
}

/* Submit Button */
.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 10px;
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #5a72d9 0%, #6a4191 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

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

/* Feature Cards */
.feature-card {
    border: none;
    border-radius: 15px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background: white;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.feature-icon {
    font-size: 3rem;
}

.feature-card .card-title {
    color: #667eea;
    font-weight: 600;
}

/* Footer */
footer {
    color: #6c757d;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    header h1 {
        font-size: 2rem;
    }

    .program-info-card h2 {
        font-size: 1.25rem;
    }

    .program-info-card h3 {
        font-size: 1rem;
    }

    .generator-card .card-body {
        padding: 1.5rem !important;
    }

    .input-group {
        flex-direction: column;
        width: 100%;
    }

    .input-group-text {
        border-radius: 10px 10px 0 0;
        border-right: 2px solid #e9ecef;
        border-bottom: none;
        width: 100%;
    }

    .input-group .form-control-lg {
        border-radius: 0 0 10px 10px;
        width: 100%;
    }

    .mb-3 > .input-group {
        width: 100%;
    }
}

/* Print Styles */
@media print {
    body {
        background: white;
    }
    
    .generator-card,
    .feature-card {
        box-shadow: none;
        border: 1px solid #dee2e6;
    }
}

/* Accessibility Improvements */
.form-control:focus,
.btn:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #5a72d9 0%, #6a4191 100%);
}

/* Loading State (optional enhancement) */
.btn-primary.loading {
    pointer-events: none;
    opacity: 0.7;
}

.btn-primary.loading::after {
    content: '';
    display: inline-block;
    width: 1rem;
    height: 1rem;
    margin-left: 0.5rem;
    border: 2px solid transparent;
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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