* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: linear-gradient(135deg, #1e1e1e 0%, #2d2d2d 100%);
    color: #ffffff;
    min-height: 100vh;
}

.container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 30px;
    padding: 20px 0;
}

.header-left {
    flex: 1;
}

.header-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
}

h1 {
    font-size: 3em;
    margin-bottom: 10px;
    background: linear-gradient(90deg, #4CAF50, #2196F3);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.version {
    font-size: 0.5em;
    vertical-align: super;
    opacity: 0.7;
}

.tagline {
    font-size: 1.2em;
    color: #bbb;
    margin-bottom: 10px;
    font-style: italic;
}

.global-stats {
    display: flex;
    gap: 15px;
}

.stat-item {
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    font-size: 12px;
    color: #aaa;
    white-space: nowrap;
}

.stat-item span {
    color: #4CAF50;
    font-weight: bold;
}


.about-toggle {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #aaa;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 13px;
}

.about-toggle:hover {
    border-color: #4CAF50;
    color: #4CAF50;
}

.about-content {
    max-width: 1400px;
    margin: 0 auto 20px;
    padding: 25px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    text-align: left;
}

.about-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.feature {
    padding: 15px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
}

.feature strong {
    display: block;
    margin-bottom: 8px;
    color: #4CAF50;
}

.feature p {
    font-size: 14px;
    color: #bbb;
    line-height: 1.4;
}

.how-it-works {
    margin-top: 20px;
}

.how-it-works h4 {
    color: #4CAF50;
    margin-bottom: 10px;
}

.how-it-works ol {
    margin-left: 20px;
    color: #bbb;
}

.how-it-works li {
    margin-bottom: 8px;
    line-height: 1.4;
}

.trending-section {
    margin-bottom: 20px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
}

.trending-section h3 {
    color: #4CAF50;
    margin-bottom: 12px;
    font-size: 14px;
}

.trending-topics {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.trending-tag {
    padding: 6px 12px;
    background: rgba(76, 175, 80, 0.15);
    border: 1px solid rgba(76, 175, 80, 0.3);
    border-radius: 20px;
    color: #4CAF50;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s;
}

.trending-tag:hover {
    background: rgba(76, 175, 80, 0.25);
    transform: translateY(-2px);
}

.mode-selector {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 20px;
}

.mode-btn {
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 25px;
    color: #999;
    cursor: pointer;
    transition: all 0.3s;
}

.mode-btn.active {
    background: linear-gradient(90deg, #4CAF50, #2196F3);
    border-color: transparent;
    color: #fff;
}

.main-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    align-items: start;
}

.left-column {
    display: flex;
    flex-direction: column;
}

.input-panel {
    flex: 1;
}

.right-column {
    display: flex;
    flex-direction: column;
}

.result-panel {
    min-height: 500px;
    flex: 1;
}

.input-section {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 25px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

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

.input-header h3 {
    color: #4CAF50;
}

.token-counter {
    text-align: right;
    font-size: 12px;
    color: #999;
}

.token-bar {
    width: 100px;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    margin-top: 4px;
    overflow: hidden;
}

.token-fill {
    height: 100%;
    background: linear-gradient(90deg, #4CAF50, #2196F3);
    transition: width 0.3s;
    width: 0%;
}

.token-fill.warning {
    background: linear-gradient(90deg, #FFA726, #FF6B6B);
}

#inputText {
    width: 100%;
    min-height: 120px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    color: #fff;
    font-size: 16px;
    resize: vertical;
    transition: all 0.3s;
}

#inputText:focus {
    outline: none;
    border-color: #4CAF50;
    background: rgba(255, 255, 255, 0.1);
}

.entropy-questions {
    margin: 20px 0;
    padding: 20px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.entropy-questions h4 {
    color: #4CAF50;
    margin-bottom: 15px;
    font-size: 14px;
}

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

.question-group:last-child {
    margin-bottom: 0;
}

.question-group label {
    display: block;
    margin-bottom: 8px;
    color: #aaa;
    font-size: 13px;
}

.options {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.option-btn {
    flex: 1;
    min-width: 60px;
    padding: 6px 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: #999;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 11px;
}

.option-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
}

.option-btn.selected {
    background: #4CAF50;
    border-color: #4CAF50;
    color: #fff;
}

.input-methods {
    display: flex;
    gap: 15px;
    margin: 20px 0;
}

.method-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.method-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.method-btn.active {
    background: #4CAF50;
    border-color: #4CAF50;
}

.analyze-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(90deg, #4CAF50, #2196F3);
    border: none;
    border-radius: 10px;
    color: #fff;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.analyze-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(76, 175, 80, 0.4);
}

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

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

.placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 500px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.placeholder-content {
    text-align: center;
    padding: 40px;
}

.placeholder-icon {
    font-size: 60px;
    display: block;
    margin-bottom: 20px;
}

.placeholder-content h3 {
    color: #4CAF50;
    margin-bottom: 10px;
}

.placeholder-content p {
    color: #999;
    margin-bottom: 20px;
}

.placeholder-tips {
    text-align: left;
    max-width: 300px;
    margin: 0 auto;
}

.placeholder-tips ul {
    margin-left: 20px;
    color: #888;
    font-size: 14px;
}

.placeholder-tips li {
    margin-bottom: 8px;
}

.result-section {
    padding: 25px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    animation: slideIn 0.5s ease;
}

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

.result-header h3 {
    color: #4CAF50;
}

.new-analysis-btn {
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    color: #aaa;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}

.new-analysis-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.verdict {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

#verdictIcon {
    font-size: 48px;
}

#verdictText {
    font-size: 28px;
    font-weight: bold;
}

.verdict.step-over #verdictText {
    color: #FF6B6B;
}

.verdict.pick-up #verdictText {
    color: #4CAF50;
}

#reason {
    font-size: 18px;
    margin-bottom: 20px;
    color: #ccc;
    line-height: 1.5;
}

.perspectives {
    margin: 20px 0;
    padding: 20px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
}

.perspectives h3 {
    margin-bottom: 15px;
    color: #4CAF50;
    font-size: 16px;
}

.perspective-item {
    padding: 12px;
    margin-bottom: 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.perspective-icon {
    font-size: 20px;
    min-width: 30px;
}

.perspective-item strong {
    color: #aaa;
    min-width: 100px;
}

.perspective-item span:last-child {
    flex: 1;
    color: #ddd;
    font-size: 14px;
}

.action-section {
    margin-top: 20px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    border-left: 4px solid #4CAF50;
}

.action-section h4 {
    color: #4CAF50;
    margin-bottom: 8px;
    font-size: 14px;
}

#action {
    color: #fff;
    line-height: 1.5;
}

.query-recap {
    margin-top: 20px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
}

.query-recap h4 {
    color: #888;
    margin-bottom: 8px;
    font-size: 13px;
}

#queryText {
    color: #aaa;
    font-style: italic;
    margin-bottom: 10px;
}

.entropy-recap {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.entropy-tag {
    padding: 4px 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    font-size: 11px;
    color: #999;
}

.hidden {
    display: none !important;
}

.history-section {
    margin-top: 20px;
    text-align: center;
}

.history-toggle {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #999;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 14px;
}

.history-toggle:hover {
    border-color: #4CAF50;
    color: #4CAF50;
}

.history-list {
    margin-top: 15px;
    text-align: left;
    max-height: 200px;
    overflow-y: auto;
}

.history-item {
    padding: 12px;
    margin-bottom: 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    border-left: 3px solid rgba(255, 255, 255, 0.2);
    cursor: pointer;
    transition: all 0.3s;
}

.history-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-left-color: #4CAF50;
}

.history-item.step-over {
    border-left-color: #FF6B6B;
}

.history-item.pick-up {
    border-left-color: #4CAF50;
}

.history-query {
    font-size: 13px;
    color: #ddd;
    margin-bottom: 4px;
}

.history-verdict {
    font-size: 12px;
    color: #999;
}

.history-time {
    font-size: 11px;
    color: #666;
    float: right;
}

footer {
    text-align: center;
    margin-top: 40px;
    padding: 20px;
    color: #666;
    font-size: 12px;
}

footer a {
    color: #4CAF50;
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    header {
        flex-direction: column;
        gap: 15px;
    }

    .header-right {
        align-items: flex-start;
        width: 100%;
    }

    h1 {
        font-size: 2em;
    }

    .main-content {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .left-column,
    .right-column {
        width: 100%;
    }

    .result-panel {
        min-height: auto;
    }

    .placeholder {
        min-height: 300px;
    }

    .about-features {
        grid-template-columns: 1fr;
    }

    .options {
        flex-direction: column;
    }

    .option-btn {
        width: 100%;
    }

    .perspective-item {
        flex-direction: column;
    }

    .perspective-item strong {
        min-width: auto;
    }

    .input-section,
    .result-section {
        padding: 20px;
    }

    .mode-selector {
        flex-direction: column;
        gap: 10px;
    }

    .mode-btn {
        width: 100%;
    }
}

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

    h1 {
        font-size: 1.8em;
    }

    .tagline {
        font-size: 0.9em;
    }

    .input-section,
    .result-section {
        padding: 15px;
    }

    #inputText {
        font-size: 14px;
    }

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