/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    min-height: 100vh;
    color: white;
    line-height: 1.6;
    overflow-x: hidden;
}

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

.hidden {
    display: none !important;
}

/* Utility Classes */
.row {
    display: flex;
    gap: 15px;
}

.col-6 {
    flex: 1;
}

/* HOME PAGE STYLES */
.home-page {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    text-align: center;
    padding: 40px 20px;
}

.logo {
    font-size: 4rem;
    margin-bottom: 24px;
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }
}

.home-page h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 16px;
    letter-spacing: -0.02em;
}

.subtitle {
    font-size: 1.1rem;
    opacity: 0.85;
    margin-bottom: 40px;
    max-width: 400px;
    font-weight: 400;
}

.features {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 40px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.features h3 {
    margin-bottom: 20px;
    color: #4ecdc4;
    font-weight: 600;
    font-size: 1.2rem;
}

.features ul {
    list-style: none;
    text-align: left;
}

.features li {
    margin-bottom: 12px;
    padding-left: 24px;
    position: relative;
    font-weight: 400;
}

.features li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #4ecdc4;
    font-weight: bold;
    font-size: 1.1rem;
}

.cta-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 100%;
    max-width: 300px;
}

.start-btn {
    border: none;
    padding: 18px 40px;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-family: inherit;
}

.start-btn.primary {
    background: linear-gradient(45deg, #ff6b6b, #ee5a52);
    color: white;
    box-shadow: 0 8px 25px rgba(255, 107, 107, 0.3);
}

.start-btn.primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(255, 107, 107, 0.4);
}

.start-btn.secondary {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    font-size: 0.95rem;
    padding: 14px 30px;
}

.start-btn.secondary:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
}

.disclaimer {
    margin-top: 30px;
    font-size: 0.85rem;
    opacity: 0.6;
    max-width: 320px;
    font-weight: 300;
}

/* FORM PAGE STYLES */
.form-page {
    padding-top: 20px;
    min-height: 100vh;
}

.form-header {
    text-align: center;
    margin-bottom: 30px;
    position: relative;
}

.back-arrow {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.back-arrow:hover {
    background: rgba(255, 255, 255, 0.2);
}

.form-header h2 {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.form-header p {
    opacity: 0.8;
    font-size: 0.95rem;
}

.progress-indicator {
    background: rgba(255, 255, 255, 0.1);
    height: 6px;
    border-radius: 3px;
    margin-bottom: 20px;
    overflow: hidden;
    position: relative;
}

.progress-bar-form {
    height: 100%;
    background: linear-gradient(45deg, #4ecdc4, #44a08d);
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 3px;
}

.progress-text {
    font-size: 0.8rem;
    opacity: 0.7;
    margin-top: 5px;
    display: block;
    text-align: center;
}

.form-container {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 30px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.form-section {
    margin-bottom: 35px;
    padding-bottom: 25px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.form-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.section-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: #4ecdc4;
    display: flex;
    align-items: center;
    gap: 8px;
}

.question-group {
    margin-bottom: 20px;
}

.question-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    font-size: 0.95rem;
    color: #e8f4f8;
}

.hint {
    font-size: 0.8rem;
    opacity: 0.7;
    margin-bottom: 8px;
    font-weight: 400;
}

.question-group input,
.question-group select,
.question-group textarea {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    font-size: 15px;
    font-family: inherit;
    transition: all 0.3s ease;
}

.question-group input:focus,
.question-group select:focus,
.question-group textarea:focus {
    outline: none;
    border-color: #4ecdc4;
    box-shadow: 0 0 0 3px rgba(78, 205, 196, 0.1);
    transform: translateY(-1px);
}

.scenario-card {
    background: rgba(0, 0, 0, 0.2);
    padding: 20px;
    border-radius: 16px;
    margin-bottom: 16px;
    border-left: 4px solid #ff6b6b;
    backdrop-filter: blur(10px);
}

.scenario-card h4 {
    color: #ff6b6b;
    margin-bottom: 12px;
    font-size: 0.95rem;
    font-weight: 500;
}

.file-upload-area {
    border: 2px dashed rgba(255, 255, 255, 0.3);
    border-radius: 16px;
    padding: 30px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.02);
}

.file-upload-area:hover {
    border-color: #4ecdc4;
    background: rgba(78, 205, 196, 0.05);
    transform: translateY(-2px);
}

.file-upload-area input[type="file"] {
    display: none;
}

.upload-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.upload-icon {
    font-size: 2rem;
    margin-bottom: 8px;
}

.upload-content p {
    font-weight: 500;
    margin: 0;
}

.upload-content small {
    opacity: 0.6;
    font-size: 0.8rem;
}

.image-preview {
    max-width: 120px;
    max-height: 120px;
    border-radius: 12px;
    margin-top: 15px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.form-actions {
    margin-top: 30px;
    text-align: center;
}

.analyze-btn {
    width: 100%;
    background: linear-gradient(45deg, #ff6b6b, #ee5a52);
    color: white;
    border: none;
    padding: 18px 24px;
    border-radius: 16px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-family: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.analyze-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(255, 107, 107, 0.4);
}

.analyze-btn:disabled {
    background: #666;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-icon {
    font-size: 1.2rem;
}

/* LOADING STYLES */
.loading-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 40px 20px;
}

.loading-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 40px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    text-align: center;
    max-width: 450px;
    width: 100%;
}

.loading-spinner {
    width: 80px;
    height: 80px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top: 4px solid #4ecdc4;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 30px;
}

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

    100% {
        transform: rotate(360deg);
    }
}

.loading-card h2 {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 20px;
}

.loading-text {
    font-size: 1.1rem;
    margin-bottom: 30px;
    font-weight: 400;
    opacity: 0.9;
}

.progress-container {
    margin-bottom: 30px;
}

.progress-bar {
    width: 100%;
    height: 10px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(45deg, #4ecdc4, #44a08d);
    width: 0%;
    transition: width 0.8s ease;
    border-radius: 5px;
}

.progress-percentage {
    font-size: 0.9rem;
    font-weight: 500;
    opacity: 0.8;
}

.console-container {
    background: #1a1a1a;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #333;
}

.console-header {
    background: #2d2d2d;
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #333;
}

.console-title {
    color: #fff;
    font-size: 0.9rem;
    font-weight: 500;
}

.console-dots {
    display: flex;
    gap: 6px;
}

.console-dots span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #666;
}

.console-dots span:nth-child(1) {
    background: #ff5f57;
}

.console-dots span:nth-child(2) {
    background: #ffbd2e;
}

.console-dots span:nth-child(3) {
    background: #28ca42;
}

.console-output {
    color: #00ff41;
    padding: 16px;
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
    font-size: 0.85rem;
    height: 140px;
    overflow-y: auto;
    text-align: left;
    line-height: 1.4;
}

.console-output div {
    margin-bottom: 4px;
}

/* RESULT STYLES */
.result-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
}

.result-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 40px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    max-width: 500px;
    width: 100%;
    text-align: center;
}

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

.result-header h2 {
    font-size: 1.8rem;
    font-weight: 600;
    margin: 0;
}

.confidence-score {
    background: rgba(78, 205, 196, 0.2);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    border: 1px solid rgba(78, 205, 196, 0.3);
}

.confidence-score .score {
    font-weight: 600;
    color: #4ecdc4;
}

.bodycount-section {
    margin-bottom: 35px;
}

.reaction-emoji {
    font-size: 6rem;
    margin-bottom: 20px;
    animation: bounce 2s infinite;
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-15px);
    }

    60% {
        transform: translateY(-8px);
    }
}

.bodycount-display {
    font-size: 5rem;
    font-weight: 800;
    margin-bottom: 20px;
    background: linear-gradient(45deg, #ff6b6b, #ffa500);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    line-height: 1;
}

.category-badge {
    display: inline-block;
    background: linear-gradient(45deg, #ff6b6b, #ee5a52);
    padding: 12px 24px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 1.2rem;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
}

.roast-section {
    background: rgba(255, 107, 107, 0.1);
    border-left: 4px solid #ff6b6b;
    border-radius: 12px;
    padding: 25px;
    margin: 30px 0;
    text-align: left;
}

.roast-section h4 {
    color: #ff6b6b;
    margin-bottom: 15px;
    font-size: 1.2rem;
    font-weight: 600;
}

.roast-content {
    position: relative;
}

.roast-text {
    font-size: 1rem;
    line-height: 1.7;
    font-style: italic;
    font-weight: 400;
}

.red-flags-section {
    background: rgba(255, 107, 107, 0.15);
    border: 1px solid rgba(255, 107, 107, 0.3);
    border-radius: 12px;
    padding: 25px;
    margin: 25px 0;
    text-align: left;
}

.red-flags-section h4 {
    color: #ff6b6b;
    margin-bottom: 15px;
    font-size: 1.1rem;
    font-weight: 600;
}

.red-flags-content {
    font-size: 0.95rem;
    line-height: 1.6;
}

.result-actions {
    display: flex;
    gap: 15px;
    margin-top: 35px;
    flex-wrap: wrap;
}

.retry-btn,
.share-btn {
    flex: 1;
    min-width: 140px;
    padding: 14px 20px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 0.95rem;
}

.retry-btn {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

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

.share-btn {
    background: linear-gradient(45deg, #4ecdc4, #44a08d);
    color: white;
    border: none;
}

.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(78, 205, 196, 0.3);
}

/* TOAST NOTIFICATIONS */
.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 12px 24px;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 500;
    z-index: 1000;
    animation: slideUp 0.3s ease;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* PROMO TOAST NOTIFICATIONS */
.promo-toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 16px 24px;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 500;
    z-index: 1000;
    animation: slideUp 0.3s ease;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    gap: 15px;
    max-width: 90%;
}

.promo-toast span {
    flex: 1;
}

.promo-btn {
    background: linear-gradient(45deg, #4ecdc4, #44a08d);
    color: white;
    padding: 8px 16px;
    border-radius: 12px;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.promo-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(78, 205, 196, 0.3);
}

/* RESPONSIVE DESIGN */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }

    .home-page h1 {
        font-size: 2rem;
    }

    .subtitle {
        font-size: 1rem;
    }

    .features {
        padding: 25px;
    }

    .form-container {
        padding: 25px;
    }

    .row {
        flex-direction: column;
        gap: 0;
    }

    .bodycount-display {
        font-size: 4rem;
    }

    .reaction-emoji {
        font-size: 4.5rem;
    }

    .result-header {
        flex-direction: column;
        text-align: center;
    }

    .result-actions {
        flex-direction: column;
    }

    .retry-btn,
    .share-btn {
        min-width: auto;
        flex: none;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 12px;
    }

    .form-container {
        padding: 20px;
    }

    .loading-card,
    .result-card {
        padding: 30px;
    }

    .bodycount-display {
        font-size: 3.5rem;
    }

    .category-badge {
        font-size: 1rem;
        padding: 10px 20px;
    }

    .roast-section,
    .red-flags-section {
        padding: 20px;
    }
}

/* ANIMATIONS */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.question-group {
    animation: fadeIn 0.5s ease-out;
}

.scenario-card {
    animation: fadeIn 0.6s ease-out;
}

/* DARK MODE ENHANCEMENTS */
.question-group input::placeholder,
.question-group select option {
    color: #666;
}

.question-group select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 12px center;
    background-repeat: no-repeat;
    background-size: 16px;
    padding-right: 40px;
    appearance: none;
}

/* CUSTOM SCROLLBAR */
.console-output::-webkit-scrollbar {
    width: 6px;
}

.console-output::-webkit-scrollbar-track {
    background: #2d2d2d;
}

.console-output::-webkit-scrollbar-thumb {
    background: #555;
    border-radius: 3px;
}

.console-output::-webkit-scrollbar-thumb:hover {
    background: #777;
}

/* LOADING STATES */
.loading-text {
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.7;
    }
}

/* SUCCESS STATES */
.success {
    color: #4ecdc4 !important;
}

.error {
    color: #ff6b6b !important;
}

.warning {
    color: #ffa500 !important;
}