@font-face {
    font-family: "JetBrains Sans";
    src: url("fonts/JetBrainsSans-Regular.woff2");
}

@font-face {
    font-family: "JetBrains Mono";
    src: url("fonts/JetBrainsMono-Regular.woff2");
}

:root {
    font-family: "JetBrains Sans", Inter, system-ui, Avenir, Helvetica, Arial, sans-serif;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.87);
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 50%, #404040 100%);
    text-align: left;
    --primary-color: #0674bb;
    --secondary-color: #4a90c2;
    --accent-color: #7db3d3;
    --success-color: #6b9080;
    --warning-color: #d4a574;
    --border-color: rgba(255, 255, 255, 0.15);
    --card-bg: rgba(45, 45, 45, 0.9);
    --input-bg: rgba(255, 255, 255, 0.08);
}

body {
    margin: 0;
    min-width: 320px;
    min-height: 100vh;
    line-height: 1.6;
}

/* Header Styles */
.header {
    background: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
    padding: 2rem 0;
    margin-bottom: 2rem;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    text-align: center;
}

.header-title {
    font-size: 3rem;
    font-weight: 600;
    margin: 0;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.header-subtitle {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.7);
    margin: 0.5rem 0 0 0;
}

#app {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Voice Section Styles */
.voice-section {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 3rem 2rem;
    margin-bottom: 2rem;
    backdrop-filter: blur(10px);
    text-align: center;
}

.ai-avatar {
    margin-bottom: 2rem;
}

.avatar-circle {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    position: relative;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(6, 116, 187, 0.3);
}

.avatar-circle.listening {
    animation: pulse-avatar 2s infinite;
    box-shadow: 0 0 40px rgba(6, 116, 187, 0.7), 0 4px 20px rgba(6, 116, 187, 0.3);
}

.pulse-ring {
    position: absolute;
    width: 140px;
    height: 140px;
    border: 2px solid var(--primary-color);
    border-radius: 50%;
    opacity: 0;
    animation: pulse-ring 2s infinite;
}

.avatar-circle.listening .pulse-ring {
    animation: pulse-ring 1.5s infinite;
}

@keyframes pulse-avatar {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes pulse-ring {
    0% {
        transform: scale(0.8);
        opacity: 1;
    }
    100% {
        transform: scale(1.4);
        opacity: 0;
    }
}

.avatar-icon {
    font-size: 3rem;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.voice-controls {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 2rem;
}

.voice-btn {
    padding: 1rem 2rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.voice-btn.primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
}

.voice-btn.primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(6, 116, 187, 0.4);
}

.voice-btn.secondary {
    background: rgba(128, 128, 128, 0.2);
    color: white;
    border: 1px solid var(--border-color);
}

.voice-btn.secondary:hover:not(:disabled) {
    background: rgba(128, 128, 128, 0.3);
}

.voice-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

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

.status-display {
    margin-bottom: 2rem;
}

.status-text {
    font-size: 1.2rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-weight: 500;
}

.speech-text {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.9);
    font-style: italic;
    min-height: 1.5rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    border-left: 4px solid var(--accent-color);
}

.example-commands {
    text-align: left;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 1.5rem;
    margin-top: 2rem;
}

.example-commands h3 {
    color: var(--primary-color);
    margin-top: 0;
    margin-bottom: 1rem;
}

.example-commands ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.example-commands li {
    padding: 0.5rem 0;
    color: rgba(255, 255, 255, 0.8);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.example-commands li:last-child {
    border-bottom: none;
}

.example-commands li::before {
    content: "💬 ";
    margin-right: 0.5rem;
}

/* Authentication Section */
.auth-section {
    background: var(--card-bg);
    border: 1px solid var(--success-color);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    text-align: center;
}

.auth-message {
    color: var(--success-color);
    font-family: "JetBrains Mono", monospace;
    font-size: 1.1rem;
    font-weight: 500;
    animation: pulse 2s infinite;
}

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

/* Report Section */
.report-section {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.report-header h2 {
    color: var(--primary-color);
    font-size: 2rem;
    margin-top: 0;
    text-align: center;
}

.report-meta {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 2rem;
}

.report-meta p {
    margin: 0.5rem 0;
    font-size: 1.1rem;
}

/* Dashboard Summary */
.dashboard-summary h3 {
    color: var(--primary-color);
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    border-left: 4px solid var(--border-color);
}

.summary-item.highlight {
    border-left-color: var(--primary-color);
    background: rgba(1, 197, 245, 0.1);
}

.summary-item.positive {
    border-left-color: var(--success-color);
    background: rgba(0, 255, 136, 0.1);
}

.summary-label {
    font-weight: 500;
    color: rgba(255, 255, 255, 0.8);
}

.summary-value {
    font-weight: 600;
    color: white;
    font-family: "JetBrains Mono", monospace;
}

/* Platform Breakdown */
.platform-breakdown h3 {
    color: var(--primary-color);
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.table-container {
    overflow-x: auto;
    margin-bottom: 1rem;
}

.royalty-table {
    width: 100%;
    border-collapse: collapse;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
    overflow: hidden;
}

.royalty-table th,
.royalty-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.royalty-table th {
    background: rgba(1, 197, 245, 0.1);
    color: var(--primary-color);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
}

.royalty-table td {
    color: rgba(255, 255, 255, 0.9);
}

.royalty-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.05);
}

.table-note {
    font-style: italic;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    margin-top: 1rem;
}

/* PoC Staking Analysis */
.poc-staking h3 {
    color: var(--primary-color);
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.staking-details {
    display: grid;
    gap: 1rem;
}

.staking-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
}

.staking-label {
    font-weight: 500;
    color: rgba(255, 255, 255, 0.8);
}

.staking-value {
    font-weight: 600;
    color: white;
    font-family: "JetBrains Mono", monospace;
}

.staking-explanation {
    background: rgba(1, 197, 245, 0.1);
    border-left: 4px solid var(--primary-color);
    padding: 1rem;
    border-radius: 8px;
    margin: 0.5rem 0;
}

.staking-explanation p {
    margin: 0;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
}

.staking-explanation code {
    background: rgba(255, 255, 255, 0.1);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-family: "JetBrains Mono", monospace;
    color: var(--accent-color);
}

/* Asset Details */
.asset-details h3 {
    color: var(--primary-color);
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.asset-info {
    display: grid;
    gap: 1rem;
}

.asset-item {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 1rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
}

.asset-label {
    font-weight: 500;
    color: rgba(255, 255, 255, 0.8);
}

.asset-value {
    color: white;
    word-break: break-all;
}

.asset-value.hash {
    font-family: "JetBrains Mono", monospace;
    color: var(--accent-color);
    font-size: 0.9rem;
}

/* Mobile Optimizations */
.mobile-device {
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.mobile-device .voice-btn {
    min-height: 48px;
    min-width: 120px;
    font-size: 1.1rem;
    padding: 1.2rem 2rem;
}

.mobile-device .avatar-circle {
    width: 100px;
    height: 100px;
}

.mobile-device .voice-section {
    padding: 2rem 1rem;
}

.mobile-device .example-commands {
    font-size: 0.9rem;
}

.mobile-device .status-text {
    font-size: 1.1rem;
}

.mobile-device .speech-text {
    font-size: 1rem;
    padding: 0.8rem;
}

/* Landscape mode adjustments */
.landscape .voice-section {
    padding: 1rem;
}

.landscape .avatar-circle {
    width: 80px;
    height: 80px;
}

.landscape .voice-controls {
    gap: 0.5rem;
}

.landscape .example-commands {
    display: none;
}

/* Touch-friendly buttons */
@media (hover: none) and (pointer: coarse) {
    .voice-btn {
        min-height: 48px;
        min-width: 120px;
        font-size: 1.1rem;
        padding: 1.2rem 2rem;
        border-radius: 12px;
    }

    .voice-btn:active {
        transform: scale(0.95);
        transition: transform 0.1s ease;
    }
}

/* Mobile Device Detection and Touch Optimizations */
.mobile-device {
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -webkit-tap-highlight-color: transparent;
}

/* Touch-friendly interactions */
@media (hover: none) and (pointer: coarse) {
    .voice-btn {
        min-height: 48px;
        min-width: 120px;
        touch-action: manipulation;
        font-size: 1.1rem;
        padding: 1.2rem 2rem;
        border-radius: 12px;
    }

    .voice-btn:active {
        transform: scale(0.95);
        transition: transform 0.1s ease;
    }

    .avatar-circle {
        touch-action: manipulation;
    }
}

/* Landscape orientation adjustments */
.landscape .voice-section {
    padding: 1rem;
}

.landscape .avatar-circle {
    width: 80px;
    height: 80px;
}

.landscape .voice-controls {
    flex-direction: row;
    gap: 1rem;
}

.landscape .example-commands {
    display: none;
}

/* Tablet Responsive (768px - 1024px) */
@media (max-width: 1024px) and (min-width: 769px) {
    .header-title {
        font-size: 2.5rem;
    }

    .voice-section {
        padding: 2.5rem 2rem;
    }

    .avatar-circle {
        width: 110px;
        height: 110px;
    }

    .voice-controls {
        gap: 1.5rem;
    }

    .summary-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        font-size: 14px;
    }

    .header {
        padding: 1.5rem 0;
        margin-bottom: 1rem;
    }

    .header-title {
        font-size: 2rem;
    }

    .header-subtitle {
        font-size: 1rem;
    }

    #app {
        padding: 0 1rem;
        max-width: 100%;
    }

    .voice-section {
        padding: 2rem 1rem;
        margin-bottom: 1rem;
    }

    .avatar-circle {
        width: 100px;
        height: 100px;
    }

    .avatar-icon {
        font-size: 2.8rem;
    }

    .voice-controls {
        flex-direction: column;
        gap: 1rem;
        align-items: center;
    }

    .voice-btn {
        width: 100%;
        max-width: 280px;
        font-size: 1rem;
        padding: 1rem 1.5rem;
        min-height: 48px;
    }

    .status-text {
        font-size: 1.1rem;
    }

    .speech-text {
        font-size: 1rem;
        padding: 0.8rem;
    }

    .example-commands {
        margin-top: 1.5rem;
        padding: 1rem;
    }

    .example-commands h3 {
        font-size: 1.2rem;
        margin-bottom: 0.8rem;
    }

    .example-commands ul {
        padding-left: 1rem;
    }

    .example-commands li {
        font-size: 0.9rem;
        padding: 0.4rem 0;
        line-height: 1.4;
    }

    /* Report sections mobile optimization */
    .auth-section,
    .report-section {
        padding: 1.5rem 1rem;
        margin-bottom: 1rem;
    }

    .report-header h2 {
        font-size: 1.5rem;
    }

    .summary-grid {
        grid-template-columns: 1fr;
        gap: 0.8rem;
    }

    .summary-item {
        padding: 0.8rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.3rem;
    }

    .summary-label {
        font-size: 0.9rem;
    }

    .summary-value {
        font-size: 1rem;
    }

    .asset-item {
        grid-template-columns: 1fr;
        gap: 0.5rem;
        padding: 0.8rem;
    }

    .asset-label {
        font-weight: 600;
        margin-bottom: 0.2rem;
    }

    /* Table mobile optimization */
    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .royalty-table {
        font-size: 0.8rem;
        min-width: 600px;
    }

    .royalty-table th,
    .royalty-table td {
        padding: 0.4rem 0.3rem;
        white-space: nowrap;
    }

    /* Staking section mobile */
    .staking-details {
        gap: 0.8rem;
    }

    .staking-item {
        padding: 0.8rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.3rem;
    }

    .staking-explanation {
        padding: 0.8rem;
        margin: 0.3rem 0;
    }
}

/* Small Mobile Devices (max-width: 480px) */
@media (max-width: 480px) {
    body {
        font-size: 13px;
    }

    .header {
        padding: 1rem 0;
    }

    .header-title {
        font-size: 1.6rem;
    }

    .header-subtitle {
        font-size: 0.9rem;
    }

    #app {
        padding: 0 0.8rem;
    }

    .voice-section {
        padding: 1.5rem 0.8rem;
    }

    .avatar-circle {
        width: 85px;
        height: 85px;
    }

    .avatar-icon {
        font-size: 2.3rem;
    }

    .voice-btn {
        font-size: 0.95rem;
        padding: 0.9rem 1.2rem;
        max-width: 250px;
        min-height: 44px;
    }

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

    .status-text {
        font-size: 1rem;
    }

    .speech-text {
        font-size: 0.9rem;
        padding: 0.7rem;
    }

    .example-commands {
        padding: 0.8rem;
        margin-top: 1rem;
    }

    .example-commands h3 {
        font-size: 1.1rem;
    }

    .example-commands li {
        font-size: 0.8rem;
        padding: 0.3rem 0;
    }

    /* Report sections for small mobile */
    .auth-section,
    .report-section {
        padding: 1rem 0.8rem;
    }

    .report-header h2 {
        font-size: 1.3rem;
    }

    .report-meta p {
        font-size: 0.9rem;
        margin: 0.3rem 0;
    }

    .summary-item {
        padding: 0.6rem;
    }

    .summary-label {
        font-size: 0.8rem;
    }

    .summary-value {
        font-size: 0.9rem;
    }

    .royalty-table {
        font-size: 0.7rem;
        min-width: 500px;
    }

    .royalty-table th,
    .royalty-table td {
        padding: 0.3rem 0.2rem;
    }

    .asset-item {
        padding: 0.6rem;
    }

    .asset-label {
        font-size: 0.8rem;
    }

    .asset-value {
        font-size: 0.8rem;
    }

    .asset-value.hash {
        font-size: 0.7rem;
        word-break: break-all;
    }
}

/* Landscape orientation on mobile devices */
@media (max-width: 768px) and (orientation: landscape) {
    .voice-section {
        padding: 1rem;
    }

    .avatar-circle {
        width: 70px;
        height: 70px;
    }

    .avatar-icon {
        font-size: 2rem;
    }

    .voice-controls {
        flex-direction: row;
        gap: 1rem;
        justify-content: center;
    }

    .voice-btn {
        max-width: 180px;
        font-size: 0.9rem;
        padding: 0.8rem 1rem;
    }

    .example-commands {
        display: none;
    }

    .status-display {
        margin-bottom: 1rem;
    }

    .status-text {
        font-size: 0.9rem;
    }

    .speech-text {
        font-size: 0.8rem;
        padding: 0.6rem;
    }
}
