/* Base Styles */
:root {
    --bg-color: #0b1120; /* Dark Navy Background */
    --card-bg: #1f2937; /* Dark Grey Card Background */
    --cyan-text: #00e5ff;
    --purple-end: #bd00ff;
    --text-white: #ffffff;
    --text-gray: #9ca3af;
    --modal-bg: #111827;
    --border-color: #374151;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-white);
    display: flex;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
}

.main-container {
    width: 100%;
    max-width: 480px;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 20px;
}

/* Robot Header */
.robot-header {
    margin-bottom: -20px; /* Overlap with title box */
    position: relative;
    z-index: 1;
}

.robot-icon-wrapper {
    text-align: center;
    position: relative;
}
.robot-icon {
    width: 250px;
    height: 250px;
}

.robot-icon-wrapper i {
    background: linear-gradient(180deg, #fff 0%, #a1a1aa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 10px 15px rgba(0,0,0,0.5));
}

.binary-bg {
    position: absolute;
    top: 10px;
    right: -40px;
    font-family: 'Courier New', monospace;
    font-size: 10px;
    color: rgba(0, 229, 255, 0.3);
    text-align: left;
    z-index: -1;
}

.bounce-anim {
    animation: bounce 3s infinite ease-in-out;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* Title Box */
.title-box {
    background-color: #111827;
    border: 2px solid #1f2937;
    border-radius: 20px;
    padding: 20px 30px;
    text-align: center;
    width: 100%;
    margin-bottom: 0; /* Connects visually to content card */
    position: relative;
    z-index: 2;
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
}

.title-box h1 {
    font-size: 24px;
    line-height: 1.2;
    font-weight: 800;
}

.cyan-text {
    color: var(--cyan-text);
}

/* Content Card */
.content-card {
    background-color: rgba(255, 255, 255, 0.1); /* Translucent gray */
    backdrop-filter: blur(10px);
    border-radius: 0 0 20px 20px;
    padding: 40px 25px 30px;
    text-align: center;
    width: 90%; /* Slightly narrower than title box */
    margin-top: -15px;
    z-index: 1;
    margin-bottom: 40px;
}

.card-title {
    font-size: 22px;
    margin-bottom: 20px;
    font-weight: 600;
}

.feature-list {
    list-style: none;
    text-align: left;
    color: #e5e7eb;
    font-size: 15px;
    line-height: 1.6;
}

.feature-list li {
    margin-bottom: 12px;
    position: relative;
    padding-left: 0;
}

/* Input Section */
.input-section {
    width: 100%;
    margin-bottom: 30px;
}

#stockInput {
    width: 100%;
    padding: 15px;
    background-color: rgba(31, 41, 55, 0.8);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: white;
    font-size: 14px;
    margin-bottom: 15px;
    outline: none;
}

#stockInput::placeholder {
    color: #6b7280;
}

#stockInput:focus {
    border-color: var(--cyan-text);
}

.gradient-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(90deg, #00c6ff 0%, #9d00ff 100%);
    border: none;
    border-radius: 4px;
    color: white;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: opacity 0.2s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.gradient-btn:hover {
    opacity: 0.9;
}

.footer-line {
    width: 100%;
    height: 1px;
    background-color: var(--border-color);
    margin-top: auto;
}

/* Modals */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: #0f172a;
    border: 1px solid #1e293b;
    border-radius: 10px;
    padding: 30px 20px;
    width: 90%;
    max-width: 400px;
    position: relative;
    text-align: center;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
}

.close-modal {
    position: absolute;
    top: 10px;
    right: 15px;
    color: #6b7280;
    font-size: 24px;
    cursor: pointer;
    line-height: 1;
}

.modal h3 {
    font-size: 20px;
    margin-bottom: 30px;
}

/* Progress Modal Specifics */
.progress-circle-container {
    margin: 30px auto;
    position: relative;
    width: 120px;
    height: 120px;
}

.progress-circle {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: conic-gradient(var(--cyan-text) 0%, #1f2937 0%);
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    transition: background 0.1s;
}

.inner-circle {
    width: 100px;
    height: 100px;
    background-color: #0f172a;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
}

#progressPercent {
    color: var(--cyan-text);
    font-size: 24px;
    font-weight: bold;
}

.analysis-steps {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
    font-size: 12px;
    color: var(--cyan-text);
}

.analysis-steps .step {
    position: relative;
}
.analysis-steps .step:not(:last-child)::after {
    content: ",";
    color: #4b5563;
}

.executing-text {
    display: block;
    width: 100%;
    margin-top: 5px;
    color: #4b5563;
    font-style: italic;
}

/* Result Modal Specifics */
.result-text {
    text-align: left;
    color: #d1d5db;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 25px;
}

.result-text p {
    margin-bottom: 10px;
}

.highlight-blue {
    color: #3b82f6; /* A bit darker blue for the link/highlight text */
    font-weight: bold;
}

.slots-text {
    margin-top: 15px;
}

.whatsapp-hint {
    margin-top: 20px;
    font-size: 12px;
    color: #4b5563;
    text-align: center;
}

.whatsapp-btn {
    background: linear-gradient(90deg, #00e5ff 0%, #d946ef 100%); /* Cyan to Pink/Purple */
    text-transform: none;
    font-size: 16px;
}

@media (max-height: 600px) {
    .robot-header { display: none; }
    .main-container { padding-top: 0; }
}
