/**
 * TRON USDT Checker - Estilos principais
 */

/* Variáveis CSS */
:root {
    --tron-primary-color: #1d3c72;
    --tron-secondary-color: #28a745;
    --tron-text-color: #424242;
    --tron-text-light: #666;
    --tron-border-color: #e0e0e0;
    --tron-bg-white: #ffffff;
    --tron-bg-light: rgba(255, 255, 255, 0.95);
    --tron-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    --tron-radius: 12px;
    --tron-radius-large: 24px;
}

/* Reset e base */
.tron-usdt-checker-wrapper {
    font-family: 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.6;
    color: var(--tron-text-color);
    margin: 0 auto;
}

.tron-usdt-checker-wrapper * {
    box-sizing: border-box;
}

/* Container principal */
.tron-container {
    width: 100%;
    max-width: 580px;
    background: var(--tron-bg-light);
    border-radius: var(--tron-radius-large);
    padding: 32px;
    box-shadow: var(--tron-shadow);
    backdrop-filter: blur(10px);
    margin: 0 auto;
    position: relative;
}

/* Cabeçalho */
.tron-header {
    text-align: center;
    margin-bottom: 32px;
}

.tron-logo {
    margin-bottom: 16px;
}

.tron-logo img {
    max-height: 60px;
    width: auto;
    object-fit: contain;
}

.tron-title {
    color: var(--tron-primary-color);
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 8px 0;
    line-height: 1.2;
}

.tron-subtitle {
    color: var(--tron-text-light);
    font-size: 16px;
    margin: 0;
    font-weight: 400;
}

/* Grupos de entrada */
.tron-input-group {
    margin-bottom: 24px;
}

.tron-input-group label {
    display: block;
    color: var(--tron-text-color);
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 14px;
}

.tron-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.tron-input-wrapper i {
    position: absolute;
    left: 16px;
    color: var(--tron-text-light);
    font-size: 16px;
    z-index: 2;
}

.tron-wallet-input {
    width: 100%;
    padding: 14px 16px 14px 48px;
    border: 2px solid var(--tron-border-color);
    border-radius: var(--tron-radius);
    font-size: 16px;
    transition: all 0.3s ease;
    color: var(--tron-text-color);
    background: var(--tron-bg-white);
    outline: none;
}

.tron-wallet-input:focus {
    border-color: var(--tron-primary-color);
    box-shadow: 0 0 0 3px rgba(29, 60, 114, 0.1);
}

.tron-wallet-input::placeholder {
    color: var(--tron-text-light);
}

/* Botões */
.tron-check-button,
.tron-save-button {
    width: 100%;
    padding: 16px;
    border: none;
    border-radius: var(--tron-radius);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    position: relative;
    overflow: hidden;
}

.tron-check-button {
    background: var(--tron-primary-color);
    color: white;
    margin-bottom: 16px;
}

.tron-check-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(29, 60, 114, 0.3);
}

.tron-save-button {
    background: var(--tron-secondary-color);
    color: white;
}

.tron-save-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(40, 167, 69, 0.3);
}

.tron-check-button:disabled,
.tron-save-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Spinner */
.tron-spinner {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: tron-spin 1s linear infinite;
    display: none;
}

@keyframes tron-spin {
    to { 
        transform: rotate(360deg); 
    }
}

/* Área de resultados */
.tron-result {
    margin-top: 24px;
}

/* Cards de transação */
.transaction-card {
    background: var(--tron-bg-white);
    padding: 20px;
    border-radius: var(--tron-radius);
    border: 1px solid var(--tron-border-color);
    margin-bottom: 16px;
    animation: tron-fadeIn 0.3s ease-out;
    transition: all 0.3s ease;
}

.transaction-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.transaction-card:last-child {
    margin-bottom: 0;
}

.transaction-amount {
    font-size: 24px;
    font-weight: 700;
    color: var(--tron-primary-color);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.transaction-amount::before {
    content: '💰';
    font-size: 20px;
}

.transaction-info {
    color: var(--tron-text-light);
    margin-bottom: 6px;
    font-size: 14px;
    line-height: 1.4;
}

.transaction-info:last-child {
    margin-bottom: 0;
}

.transaction-info strong {
    color: var(--tron-text-color);
    font-weight: 600;
}

.transaction-info a {
    color: var(--tron-primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.transaction-info a:hover {
    text-decoration: underline;
    color: var(--tron-primary-color);
}

/* Mensagem de erro */
.error-message {
    margin-top: 16px;
    padding: 16px;
    background: #ffebee;
    color: #c62828;
    border-radius: var(--tron-radius);
    font-size: 14px;
    border-left: 4px solid #c62828;
    display: flex;
    align-items: center;
    gap: 8px;
}

.error-message::before {
    content: '⚠️';
    font-size: 16px;
}

/* Mensagem de sucesso */
.success-message {
    margin-top: 16px;
    padding: 16px;
    background: #e8f5e8;
    color: #2e7d32;
    border-radius: var(--tron-radius);
    font-size: 14px;
    border-left: 4px solid #2e7d32;
    display: flex;
    align-items: center;
    gap: 8px;
}

.success-message::before {
    content: '✅';
    font-size: 16px;
}

/* Loading state */
.tron-loading .transaction-card {
    opacity: 0.7;
    pointer-events: none;
}

/* Animações */
@keyframes tron-fadeIn {
    from { 
        opacity: 0; 
        transform: translateY(10px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

/* Tema escuro */
.tron-theme-dark {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
}

.tron-theme-dark .tron-title {
    color: white;
}

.tron-theme-dark .tron-subtitle {
    color: rgba(255, 255, 255, 0.8);
}

.tron-theme-dark .tron-input-group label {
    color: rgba(255, 255, 255, 0.9);
}

.tron-theme-dark .tron-wallet-input {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    color: white;
}

.tron-theme-dark .tron-wallet-input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.tron-theme-dark .tron-wallet-input:focus {
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1);
}

.tron-theme-dark .transaction-card {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

.tron-theme-dark .transaction-info {
    color: rgba(255, 255, 255, 0.8);
}

.tron-theme-dark .transaction-info strong {
    color: white;
}

/* Responsividade */
@media (max-width: 640px) {
    .tron-container {
        padding: 24px;
        margin: 16px;
        border-radius: 16px;
    }

    .tron-title {
        font-size: 24px;
    }

    .tron-subtitle {
        font-size: 14px;
    }

    .tron-wallet-input {
        font-size: 16px; /* Previne zoom no iOS */
    }

    .transaction-amount {
        font-size: 20px;
    }

    .transaction-info {
        font-size: 13px;
    }
}

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

    .tron-title {
        font-size: 22px;
    }

    .tron-check-button,
    .tron-save-button {
        padding: 14px;
        font-size: 15px;
    }
}

/* Estados de foco para acessibilidade */
.tron-check-button:focus,
.tron-save-button:focus {
    outline: 2px solid var(--tron-primary-color);
    outline-offset: 2px;
}

.tron-wallet-input:focus {
    outline: none;
}

/* Transições suaves */
* {
    transition: color 0.3s ease, background-color 0.3s ease, border-color 0.3s ease;
}

/* Print styles */
@media print {
    .tron-container {
        box-shadow: none;
        background: white;
        color: black;
    }

    .tron-check-button,
    .tron-save-button {
        display: none;
    }
}