/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: #000000;
    color: #ffffff;
    min-height: 100vh;
    line-height: 1.2;
    font-size: 16px;
    cursor: crosshair;
}

/* 12-column grid system */
.container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0;
    min-height: 100vh;
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-template-rows: auto 1fr;
    grid-gap: 2px;
    background: #000000;
    position: relative;
}

/* Grid overlay for development */
.container::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px),
        linear-gradient(0deg, rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: calc(100% / 12) 100%, 100% 40px;
    pointer-events: none;
    z-index: 1000;
}

/* Cursor coordinates display */
.cursor-coordinates {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #ffffff;
    color: #000000;
    padding: 8px 12px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    font-weight: bold;
    border: 2px solid #ffffff;
    z-index: 1001;
    pointer-events: none;
}

/* Header */
.header {
    grid-column: 1 / -1;
    grid-row: 1;
    text-align: center;
    padding: 10px 10px;
    background: #000000;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 10px;
}

.logo-icon {
    width: 4rem;
    height: 4rem;
    padding: 10px;
    color: #000000;
}

.header h1 {
    font-size: 4rem;
    font-weight: 900;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    border: 2px solid #ffffff;
    padding: 20px;
    background: #000000;
}

.subtitle {
    font-size: 1.5rem;
    color: #ffffff;
    font-weight: 300;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border: 1px solid #ffffff;
    padding: 15px;
    background: #000000;
}



/* Screens */
.screen {
    grid-column: 1 / -1;
    grid-row: 2;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    background: #000000;
}

.screen.hidden {
    display: none;
}

/* Input Screen */
.input-container {
    grid-column: 3 / 11;
    width: 100%;
    background: #000000;
    padding: 20px;
}

.input-label {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    border: 2px solid #ffffff;
    padding: 15px;
    background: #000000;
}

.label-icon {
    width: 200px;
    height: auto;
    padding: 10px;
    background: #000000;
    display: block;
    margin: 0 auto;
}

.wallet-input {
    width: 100%;
    min-height: 300px;
    padding: 30px;
    background: #000000;
    border: 2px solid #ffffff;
    color: #ffffff;
    font-family: 'Courier New', monospace;
    font-size: 1.2rem;
    line-height: 1.4;
    resize: vertical;
    text-transform: uppercase;
}

.wallet-input:focus {
    outline: none;
    border: 3px solid #ffffff;
    background: #000000;
}

.wallet-input::placeholder {
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.input-info {
    display: flex;
    align-items: center;
    gap: 15px;
    margin: 30px 0;
    padding: 20px;
    background: #000000;
    border: 2px solid #ffffff;
    font-size: 1.2rem;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.info-icon {
    font-size: 1.5rem;
    border: 2px solid #ffffff;
    padding: 8px;
    background: #ffffff;
    color: #000000;
}

.analyze-btn {
    width: 100%;
    padding: 25px 40px;
    background: linear-gradient(90deg, #9945FF 0%, #8752F3 30%, #5497D5 50%, #43B4CA 60%, #28E0B9 72%, #19FB9B 100%);
    border: 3px solid #ffffff;
    color: #ffffff;
    font-size: 1.5rem;
    font-weight: 700;
    cursor: crosshair;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    transition: all 0.2s ease;
    margin-top: 20px;
    border-radius: 8px;
}

.analyze-btn:hover {
    background: linear-gradient(90deg, #B366FF 0%, #9A6FF3 30%, #6BA7D5 50%, #5AC4CA 60%, #3AF0B9 72%, #2AFF9B 100%);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(153, 69, 255, 0.3);
}

.analyze-btn:active {
    transform: scale(0.98);
}

.btn-icon {
    font-size: 2rem;
    border: 2px solid currentColor;
    padding: 8px;
}

/* Loading Screen */
.loading-container {
    grid-column: 4 / 10;
    text-align: center;
    width: 100%;
    border: 2px solid #ffffff;
    padding: 40px;
    background: #000000;
}

.blockchain-spinner {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 40px;
}

.block {
    width: 3rem;
    height: 3rem;
    padding: 15px;
    background: #000000;
    animation: blockchain-rotate 2s infinite linear;
    display: flex;
    align-items: center;
    justify-content: center;
}

.block img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.block:nth-child(1) { animation-delay: 0s; }
.block:nth-child(2) { animation-delay: 0.2s; }
.block:nth-child(3) { animation-delay: 0.4s; }
.block:nth-child(4) { animation-delay: 0.6s; }
.block:nth-child(5) { animation-delay: 0.8s; }

@keyframes blockchain-rotate {
    0% { 
        transform: rotateY(0deg);
        border-color: #ffffff;
    }
    50% { 
        transform: rotateY(180deg);
        border-color: #ffffff;
        background: #ffffff;
        color: #000000;
    }
    100% { 
        transform: rotateY(360deg);
        border-color: #ffffff;
    }
}

.loading-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    border: 2px solid #ffffff;
    padding: 20px;
    background: #000000;
}

.loading-subtitle {
    color: #ffffff;
    margin-bottom: 40px;
    font-size: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border: 1px solid #ffffff;
    padding: 15px;
    background: #000000;
}

.loading-progress {
    max-width: 400px;
    margin: 0 auto;
    border: 2px solid #ffffff;
    padding: 20px;
    background: #000000;
}

.progress-bar {
    width: 100%;
    height: 10px;
    background: #000000;
    border: 2px solid #ffffff;
    overflow: hidden;
    margin-bottom: 20px;
}

.progress-fill {
    height: 100%;
    background: #ffffff;
    animation: progress-fill 3s infinite ease-in-out;
}

@keyframes progress-fill {
    0% { width: 0%; }
    50% { width: 70%; }
    100% { width: 100%; }
}

.progress-text {
    font-size: 1.2rem;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-family: 'Courier New', monospace;
}

/* Results Screen */
.results-container {
    grid-column: 1 / -1;
    width: 100%;
    padding: 40px;
    background: #000000;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    border: 2px solid #ffffff;
    padding: 20px;
    background: #000000;
}

.results-title {
    font-size: 3rem;
    font-weight: 700;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 0.2em;
}

.new-analysis-btn {
    padding: 20px 30px;
    background: linear-gradient(90deg, #9945FF 0%, #8752F3 30%, #5497D5 50%, #43B4CA 60%, #28E0B9 72%, #19FB9B 100%);
    border: 2px solid #ffffff;
    color: #ffffff;
    font-weight: 700;
    cursor: crosshair;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 1.2rem;
    transition: all 0.2s ease;
    border-radius: 6px;
}

.new-analysis-btn:hover {
    background: linear-gradient(90deg, #B366FF 0%, #9A6FF3 30%, #6BA7D5 50%, #5AC4CA 60%, #3AF0B9 72%, #2AFF9B 100%);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(153, 69, 255, 0.3);
}

.portfolio-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #000000;
    border: 2px solid #ffffff;
    padding: 30px;
    margin-bottom: 40px;
}

.total-value {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.value-label {
    font-size: 1.5rem;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border: 1px solid #ffffff;
    padding: 10px;
    background: #000000;
}

.value-amount {
    font-size: 3rem;
    font-weight: 700;
    color: #ffffff;
    border: 2px solid #ffffff;
    padding: 15px;
    background: #000000;
    font-family: 'Courier New', monospace;
}

.network-badge {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 25px;
    background: #000000;
    border: 2px solid #ffffff;
    font-weight: 700;
    font-size: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.badge-icon {
    width: 2.5rem;
    height: 2.5rem;
    padding: 8px;
    background: #000000;
}

.chart-container {
    background: #000000;
    border: 2px solid #ffffff;
    padding: 30px;
    margin-bottom: 40px;
}

.tokens-list {
    background: #000000;
    border: 2px solid #ffffff;
    padding: 30px;
}

.tokens-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 30px;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    border: 2px solid #ffffff;
    padding: 20px;
    background: #000000;
}

.tokens-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
}

.token-card {
    background: #000000;
    border: 2px solid #ffffff;
    padding: 25px;
    transition: all 0.2s ease;
}

.token-card:hover {
    background: #ffffff;
    color: #000000;
}

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

.token-name {
    font-weight: 700;
    color: inherit;
    font-size: 1.3rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.token-value {
    font-weight: 700;
    color: inherit;
    font-size: 1.5rem;
    font-family: 'Courier New', monospace;
    border: 1px solid currentColor;
    padding: 8px;
    background: transparent;
}

.token-details {
    display: flex;
    justify-content: space-between;
    font-size: 1.1rem;
    color: inherit;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-family: 'Courier New', monospace;
}

/* Error Screen */
.error-container {
    grid-column: 4 / 10;
    text-align: center;
    width: 100%;
    border: 2px solid #ffffff;
    padding: 40px;
    background: #000000;
}

.error-icon {
    font-size: 5rem;
    margin-bottom: 30px;
    animation: shake 0.5s ease-in-out;
    border: 3px solid #ffffff;
    padding: 20px;
    background: #ffffff;
    color: #000000;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

.error-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    border: 2px solid #ffffff;
    padding: 20px;
    background: #000000;
}

.error-message {
    color: #ffffff;
    margin-bottom: 40px;
    font-size: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border: 1px solid #ffffff;
    padding: 15px;
    background: #000000;
    font-family: 'Courier New', monospace;
}

.retry-btn {
    padding: 25px 40px;
    background: #000000;
    border: 3px solid #ffffff;
    color: #ffffff;
    font-weight: 700;
    cursor: crosshair;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    display: flex;
    align-items: center;
    gap: 15px;
    margin: 0 auto;
    font-size: 1.3rem;
    transition: all 0.2s ease;
}

.retry-btn:hover {
    background: #ffffff;
    color: #000000;
}

/* Mobile-first Responsive Design */
@media (max-width: 768px) {
    .container {
        grid-template-columns: repeat(6, 1fr);
        grid-gap: 1px;
    }
    
    .header h1 {
        font-size: 2rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .input-container {
        grid-column: 1 / -1;
        padding: 15px;
    }
    
    .wallet-input {
        padding: 20px;
        font-size: 1rem;
    }
    
    .analyze-btn {
        padding: 20px;
        font-size: 1.2rem;
    }
    
    .loading-container {
        grid-column: 1 / -1;
        padding: 15px;
    }
    
    .loading-title {
        font-size: 1.8rem;
    }
    
    .results-container {
        grid-column: 1 / -1;
        padding: 15px;
    }
    
    .results-header {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    
    .results-title {
        font-size: 2rem;
    }
    
    .portfolio-summary {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    
    .value-amount {
        font-size: 2rem;
    }
    
    .tokens-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .error-container {
        grid-column: 1 / -1;
        padding: 15px;
    }
    
    .error-title {
        font-size: 1.8rem;
    }
}

@media (max-width: 480px) {
    .container {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .header h1 {
        font-size: 1.5rem;
    }
    
    .analyze-btn {
        padding: 15px;
        font-size: 1rem;
    }
    
    .loading-title {
        font-size: 1.5rem;
    }
    
    .results-title {
        font-size: 1.5rem;
    }
    
    .value-amount {
        font-size: 1.5rem;
    }
    
    .tokens-title {
        font-size: 1.5rem;
    }
    
    .error-title {
        font-size: 1.5rem;
    }
}
