/* Custom Bootstrap Overrides and Additional Styles */

/* Background Gradient */
.bg-gradient-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px 0;
}

/* Custom Purple Button */
.btn-purple {
    background: linear-gradient(135deg, #9b59b6 0%, #8e44ad 100%);
    border: none;
    color: white;
}

.btn-purple:hover {
    background: linear-gradient(135deg, #8e44ad 0%, #7d3c98 100%);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(155, 89, 182, 0.3);
}

/* Upload Status Messages */
.upload-status {
    display: none;
    padding: 0.75rem 1rem;
    border-radius: 0.375rem;
    margin-top: 0.5rem;
}

.upload-status.success {
    background-color: #d1e7dd;
    color: #0f5132;
    border: 1px solid #badbcc;
    display: block;
}

.upload-status.error {
    background-color: #f8d7da;
    color: #842029;
    border: 1px solid #f5c2c7;
    display: block;
}

/* File Input Custom Styling */
.input-group input[type="file"] {
    cursor: pointer;
}

.input-group input[type="file"]::-webkit-file-upload-button {
    visibility: hidden;
}

/* Card Hover Effect */
.card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1) !important;
}

/* Form Controls Focus */
.form-control:focus,
.form-check-input:focus {
    border-color: #3498db;
    box-shadow: 0 0 0 0.25rem rgba(52, 152, 219, 0.25);
}

/* Button Disabled State */
.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* Project Info Preview */
#projectInfoPreview {
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#projectInfoContent {
    font-size: 0.875rem;
    line-height: 1.6;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .display-4 {
        font-size: 2rem;
    }
    
    .btn-lg {
        font-size: 1rem;
        padding: 0.5rem 1rem;
    }
    
    .d-flex.gap-3 {
        flex-direction: column;
    }
    
    .d-flex.gap-3 .btn {
        width: 100%;
    }
}

/* Loading Spinner Animation */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Custom Alert Styles */
.alert {
    border-radius: 0.5rem;
}

.alert-info {
    background-color: #e8f4fd;
    border-color: #3498db;
    color: #2c3e50;
}

/* Section Title Border */
.border-bottom.border-primary {
    border-width: 3px !important;
}

/* Card Body Spacing */
.card-body {
    padding: 1.5rem;
}

/* Textarea Styling */
textarea.form-control {
    resize: vertical;
    min-height: 120px;
}

/* Button Group Spacing */
.d-flex.gap-2 {
    gap: 0.5rem;
}

.d-flex.gap-3 {
    gap: 1rem;
}

/* Icon Spacing */
.btn i {
    margin-right: 0.5rem;
}

/* Shadow Enhancement */
.shadow-lg {
    box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.175) !important;
}

/* ChatGPT Ready Status Card */
#chatgptReadyStatus {
    border: 2px solid #28a745;
    animation: slideDown 0.3s ease;
}

#chatgptReadyStatus .card-header {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
}

#chatgptReadyStatus .badge {
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

/* Ready Status Text */
#readyStatusText {
    font-weight: 600;
}

/* ========== Hamburger menu (responsive nav) ========== */
.hamburger-btn {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    padding: 8px;
    background: transparent;
    border: 1px solid #ddd;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s;
}
.hamburger-btn:hover {
    background: #f0f0f0;
}
.hamburger-btn span {
    display: block;
    width: 100%;
    height: 2px;
    background: #333;
    border-radius: 1px;
    transition: transform 0.3s, opacity 0.3s;
}
.hamburger-btn.open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.hamburger-btn.open span:nth-child(2) {
    opacity: 0;
}
.hamburger-btn.open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 768px) {
    .navbar .hamburger-btn {
        display: flex;
        order: 2;
        z-index: 1001;
    }
    .navbar .nav-container {
        flex-wrap: wrap;
        position: relative;
    }
    .navbar .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        gap: 0;
        background: #fff;
        box-shadow: 0 4px 12px rgba(0,0,0,0.1);
        padding: 1rem 0;
        margin: 0 -2rem;
        list-style: none;
        z-index: 1000;
    }
    .navbar .nav-menu.open {
        display: flex;
    }
    .navbar .nav-menu li {
        border-bottom: 1px solid #eee;
    }
    .navbar .nav-menu li:last-child {
        border-bottom: none;
    }
    .navbar .nav-menu a {
        display: block;
        padding: 0.75rem 2rem;
    }
}
