/* ========================================
   FIORRA WALLET - STYLES
   ======================================== */

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #2d3748;
    overflow-x: hidden;
}

/* Aurora Background */
.aurora-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    opacity: 0.3;
    background: 
        radial-gradient(ellipse at 20% 30%, rgba(120, 119, 198, 0.3), transparent 50%),
        radial-gradient(ellipse at 80% 70%, rgba(255, 107, 237, 0.3), transparent 50%);
    animation: aurora 15s ease-in-out infinite;
}

@keyframes aurora {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.5; }
}

/* Container */
.wallet-container {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
}

/* Header */
.wallet-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 30px;
    gap: 15px;
}

.back-button {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    padding: 10px 20px;
    border-radius: 12px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.back-button:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateX(-5px);
}

.page-title {
    color: white;
    font-size: 28px;
    font-weight: 700;
    text-align: center;
    flex: 1;
}

.page-title .icon {
    font-size: 32px;
    vertical-align: middle;
}

.header-spacer {
    width: 100px;
}

/* Glass Card */
.glass-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 25px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

/* Balance Card */
.balance-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-align: center;
    padding: 30px;
}

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

.balance-label {
    font-size: 14px;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.balance-icon {
    font-size: 24px;
}

.balance-amount {
    font-size: 48px;
    font-weight: 700;
    margin: 20px 0;
    letter-spacing: -1px;
}

.balance-footer {
    display: flex;
    justify-content: space-around;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.balance-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.info-label {
    font-size: 12px;
    opacity: 0.8;
}

.info-value {
    font-size: 16px;
    font-weight: 600;
}

/* Card Header */
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.card-title {
    font-size: 20px;
    font-weight: 600;
    color: #2d3748;
}

.card-title .icon {
    font-size: 24px;
    vertical-align: middle;
    margin-right: 8px;
}

/* Wallet Address */
.address-content {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.address-input-group {
    display: flex;
    gap: 10px;
}

.address-input {
    flex: 1;
    padding: 12px 15px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 14px;
    font-family: 'Courier New', monospace;
    transition: all 0.3s ease;
}

.address-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.copy-button {
    background: #667eea;
    color: white;
    border: none;
    padding: 12px 15px;
    border-radius: 12px;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.copy-button:hover {
    background: #5568d3;
    transform: scale(1.05);
}

.address-actions {
    display: flex;
    gap: 10px;
}

.btn-secondary,
.btn-primary {
    flex: 1;
    padding: 12px 20px;
    border: none;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary {
    background: #e2e8f0;
    color: #2d3748;
}

.btn-secondary:hover {
    background: #cbd5e0;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.btn-large {
    width: 100%;
    padding: 15px;
    font-size: 16px;
}

.address-note,
.transfer-note {
    font-size: 13px;
    color: #718096;
    text-align: center;
    margin-top: 5px;
}

/* Transfer Form */
.transfer-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 14px;
    font-weight: 600;
    color: #2d3748;
}

.form-input {
    padding: 12px 15px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.input-hint {
    font-size: 12px;
    color: #718096;
}

/* Transfer Summary */
.transfer-summary {
    background: #f7fafc;
    border-radius: 12px;
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    color: #4a5568;
}

.summary-row.total {
    font-size: 16px;
    font-weight: 700;
    color: #2d3748;
    padding-top: 10px;
    border-top: 2px solid #e2e8f0;
}

/* Pending Transfers */
.pending-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.pending-item {
    background: #fff8dc;
    border-left: 4px solid #f6ad55;
    padding: 15px;
    border-radius: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pending-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.pending-amount {
    font-size: 18px;
    font-weight: 700;
    color: #2d3748;
}

.pending-date {
    font-size: 12px;
    color: #718096;
}

.pending-status {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.pending-status.open {
    background: #fef5e7;
    color: #d97706;
}

.pending-status.processing {
    background: #dbeafe;
    color: #2563eb;
}

/* Transaction History */
.filter-select {
    padding: 8px 12px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    background: white;
}

.filter-select:focus {
    outline: none;
    border-color: #667eea;
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 500px;
    overflow-y: auto;
}

.history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: #f7fafc;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.history-item:hover {
    background: #edf2f7;
    transform: translateX(5px);
}

.history-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.history-icon {
    font-size: 24px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.history-icon.income {
    background: #d1fae5;
}

.history-icon.expense {
    background: #fed7d7;
}

.history-details {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.history-type {
    font-size: 14px;
    font-weight: 600;
    color: #2d3748;
}

.history-date {
    font-size: 12px;
    color: #718096;
}

.history-amount {
    font-size: 16px;
    font-weight: 700;
}

.history-amount.income {
    color: #10b981;
}

.history-amount.expense {
    color: #ef4444;
}

/* Loading */
.loading-shimmer {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 8px;
    height: 60px;
    margin-bottom: 10px;
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* Elegant Balance Loading */
.balance-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 20px 0;
}

.balance-loading span {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 500;
}

.balance-loader {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.2);
    border-top-color: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* Elegant History Loading */
.history-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 40px 20px;
    color: #718096;
}

.history-loading span {
    font-size: 0.95rem;
    font-weight: 500;
}

.history-loader {
    width: 32px;
    height: 32px;
    border: 3px solid rgba(139, 92, 246, 0.2);
    border-top-color: #8b5cf6;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-overlay.active {
    display: flex;
}

.loading-spinner {
    text-align: center;
}

.spinner-ring {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

.spinner-ring:nth-child(2) {
    animation-delay: 0.15s;
}

.spinner-ring:nth-child(3) {
    animation-delay: 0.3s;
}

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

.loading-text {
    color: white;
    font-size: 16px;
    margin-top: 10px;
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: -100px;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    padding: 15px 25px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 10000;
    transition: bottom 0.3s ease;
}

.toast.show {
    bottom: 30px;
}

.toast-icon {
    font-size: 24px;
}

.toast-message {
    font-size: 14px;
    font-weight: 600;
    color: #2d3748;
}

/* Responsive */
@media (max-width: 768px) {
    .wallet-container {
        padding: 15px;
    }

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

    .balance-amount {
        font-size: 36px;
    }

    .header-spacer {
        display: none;
    }

    .address-actions {
        flex-direction: column;
    }

    .balance-footer {
        flex-direction: column;
        gap: 15px;
    }
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #718096;
}

.empty-state .icon {
    font-size: 48px;
    margin-bottom: 15px;
    opacity: 0.5;
}

.empty-state p {
    font-size: 14px;
}

/* Token Yükle Button */
.topup-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
    padding: 12px 28px;
    background: linear-gradient(135deg, #8b5cf6 0%, #a855f7 50%, #d946ef 100%);
    color: white;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 50px;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.4);
    transition: all 0.3s ease;
}

.topup-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.5);
}

.topup-button:active {
    transform: translateY(0);
}

.topup-icon {
    font-size: 1.1rem;
}

.topup-text {
    letter-spacing: 0.5px;
}


/* ========================================
   ADDRESS CONFIRMATION CHECKBOXES
   ======================================== */

.address-confirmations {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 16px 0;
    padding: 16px;
    background: rgba(255, 193, 7, 0.1);
    border: 1px solid rgba(255, 193, 7, 0.3);
    border-radius: 12px;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    user-select: none;
}

.checkbox-label input[type="checkbox"] {
    display: none;
}

.checkbox-custom {
    width: 22px;
    height: 22px;
    min-width: 22px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-radius: 6px;
    background: rgb(0 0 0 / 10%);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.checkbox-label input[type="checkbox"]:checked + .checkbox-custom {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-color: #10b981;
}

.checkbox-label input[type="checkbox"]:checked + .checkbox-custom::after {
    content: '✓';
    color: white;
    font-size: 14px;
    font-weight: bold;
}

.checkbox-text {
    color: rgb(4 4 4 / 90%);
    font-size: 0.9rem;
    line-height: 1.4;
}

.checkbox-text strong {
    color: #ff0052;
}

/* ========================================
   TRANSFER CONFIRMATION MODAL
   ======================================== */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 20px;
}

.modal-content {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 24px;
    width: 100%;
    max-width: 400px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: modalSlideUp 0.3s ease;
}

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

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: white;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.modal-header {
    text-align: center;
    margin-bottom: 24px;
}

.modal-icon {
    font-size: 48px;
    display: block;
    margin-bottom: 12px;
}

.modal-title {
    color: white;
    font-size: 1.4rem;
    margin-bottom: 8px;
}

.modal-subtitle {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
}

/* Transfer Summary in Modal */
.transfer-confirm-summary {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 20px;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.summary-item:last-child {
    border-bottom: none;
}

.summary-item .label {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.85rem;
}

.summary-item .value {
    color: white;
    font-weight: 600;
    font-size: 0.95rem;
}

.summary-item .value.highlight {
    color: #10b981;
    font-size: 1.1rem;
}

.summary-item .value.address {
    font-family: monospace;
    font-size: 0.75rem;
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Warning Box */
.warning-box {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 12px;
    padding: 14px;
    margin-bottom: 20px;
}

.warning-box .warning-icon {
    font-size: 24px;
}

.warning-box p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.85rem;
    line-height: 1.5;
}

/* Code Input */
.code-info {
    text-align: center;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 24px;
    font-size: 0.9rem;
}

.code-input-container {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 24px;
}

.code-input-container .code-input {
    width: 45px;
    height: 55px;
    text-align: center;
    font-size: 1.5rem;
    font-weight: 700;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    color: white;
    outline: none;
    transition: all 0.2s;
}

.code-input-container .code-input:focus {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.1);
}

.code-input-container .code-input.filled {
    border-color: #10b981;
    background: rgba(16, 185, 129, 0.1);
}

/* Resend Section */
.resend-section {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
}

#resend-timer {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.85rem;
}

.btn-link {
    background: none;
    border: none;
    color: #667eea;
    font-size: 0.85rem;
    cursor: pointer;
    text-decoration: underline;
}

.btn-link:disabled {
    color: rgba(255, 255, 255, 0.3);
    cursor: not-allowed;
    text-decoration: none;
}

/* Success Animation */
.success-animation {
    text-align: center;
    margin-bottom: 20px;
}

.success-icon {
    font-size: 64px;
    animation: successPulse 0.5s ease;
}

@keyframes successPulse {
    0% { transform: scale(0); opacity: 0; }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); opacity: 1; }
}

.success-title {
    color: #10b981;
    text-align: center;
    margin-bottom: 12px;
    font-size: 1.3rem;
}

.success-message {
    color: rgba(255, 255, 255, 0.7);
    text-align: center;
    margin-bottom: 24px;
    font-size: 0.9rem;
}

/* Modal Buttons */
.modal-content .btn-primary {
    width: 100%;
    padding: 14px;
    font-size: 1rem;
}

.modal-content .btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
