/* Modern TRON Energy Rental UI - Better than 6789trx.com */

:root {
    --primary-gradient: linear-gradient(135deg, #FF0080 0%, #7928CA 100%);
    --secondary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --success-gradient: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);

    --bg-dark: #0a0e27;
    --bg-card: rgba(255, 255, 255, 0.05);
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --text-muted: rgba(255, 255, 255, 0.5);

    --border-glass: rgba(255, 255, 255, 0.1);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.3);

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', 'SF Pro Display', sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(10, 14, 39, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-glass);
    padding: 16px 0;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    width: 32px;
    height: 32px;
}

.brand-name {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.brand-pro {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links {
    display: flex;
    gap: 32px;
    align-items: center;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: var(--text-primary);
}

.btn-logout {
    padding: 8px 12px;
    margin-left: 8px;
    border-radius: var(--radius-sm);
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    transition: all 0.2s;
}

.btn-logout:hover {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444 !important;
}

/* Buttons */
.btn-primary, .btn-secondary {
    padding: 12px 24px;
    border-radius: var(--radius-md);
    border: none;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: var(--primary-gradient);
    color: white;
    box-shadow: 0 4px 16px rgba(255, 0, 128, 0.3);
}

.btn-primary:hover:not(:disabled) {
    box-shadow: 0 8px 24px rgba(255, 0, 128, 0.4);
    transform: translateY(-2px);
}

.btn-primary:disabled {
    background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
    cursor: not-allowed;
    box-shadow: none;
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border-glass);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
}

.btn-lg {
    padding: 16px 32px;
    font-size: 16px;
}

.btn-full {
    width: 100%;
    justify-content: center;
}

.btn-icon {
    width: 20px;
    height: 20px;
}

.btn-icon-left {
    width: 18px;
    height: 18px;
}

/* Hero Section */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 120px 0 80px;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at top, rgba(121, 40, 202, 0.15) 0%, transparent 60%),
                radial-gradient(ellipse at bottom right, rgba(255, 0, 128, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.hero .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: 100px;
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.badge-icon {
    font-size: 16px;
}

.hero-title {
    font-size: 64px;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -2px;
    margin-bottom: 24px;
}

.gradient-text {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 20px;
    color: var(--text-secondary);
    margin-bottom: 40px;
    line-height: 1.6;
}

.hero-cta {
    display: flex;
    gap: 16px;
    margin-bottom: 64px;
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.stat {
    text-align: left;
}

.stat-value {
    font-size: 36px;
    font-weight: 700;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: 14px;
    color: var(--text-muted);
}

/* Glass Card */
.glass-card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-xl);
    padding: 32px;
    box-shadow: var(--shadow-lg);
}

.floating {
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

.card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 24px;
    font-size: 14px;
    color: var(--text-secondary);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #38ef7d;
    animation: pulse 2s infinite;
}

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

.order-item {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-glass);
}

.order-item:last-of-type {
    border-bottom: none;
}

.label {
    color: var(--text-muted);
    font-size: 14px;
}

.value {
    font-weight: 600;
}

.progress-bar {
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 100px;
    overflow: hidden;
    margin: 16px 0;
}

.progress-fill {
    height: 100%;
    background: var(--success-gradient);
    width: 75%;
    border-radius: 100px;
    animation: progress 2s ease-out;
}

@keyframes progress {
    from { width: 0; }
    to { width: 75%; }
}

.order-status {
    font-size: 14px;
    color: #38ef7d;
}

/* Features Section */
.features {
    padding: 120px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 80px;
}

.section-title {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 16px;
}

.section-subtitle {
    font-size: 20px;
    color: var(--text-secondary);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.feature-card {
    padding: 32px;
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    transition: all 0.3s;
}

.feature-card:hover {
    transform: translateY(-8px);
    border-color: rgba(255, 0, 128, 0.5);
    box-shadow: 0 8px 32px rgba(255, 0, 128, 0.2);
}

.feature-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin-bottom: 20px;
}

.gradient-bg {
    background: var(--primary-gradient);
}

.feature-card h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 12px;
}

.feature-card p {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Pricing Section */
.pricing {
    padding: 120px 0;
    background: linear-gradient(180deg, transparent 0%, rgba(121, 40, 202, 0.05) 100%);
}

.pricing-card {
    max-width: 600px;
    margin: 0 auto;
}

.calc-row {
    margin-bottom: 32px;
}

.calc-row label {
    display: block;
    font-weight: 600;
    margin-bottom: 12px;
}

.calc-row input[type="range"] {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 100px;
    outline: none;
    -webkit-appearance: none;
}

.calc-row input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary-gradient);
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(255, 0, 128, 0.5);
}

.calc-row select {
    width: 100%;
    padding: 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 16px;
    cursor: pointer;
}

.calc-row select option {
    background: #1a1e3a;
    color: var(--text-primary);
}

#energy-display {
    font-size: 32px;
    font-weight: 700;
    display: block;
    text-align: center;
    margin-top: 16px;
}

.calc-result {
    background: rgba(255, 0, 128, 0.1);
    border: 1px solid rgba(255, 0, 128, 0.3);
    border-radius: var(--radius-md);
    padding: 32px;
    text-align: center;
    margin-bottom: 32px;
}

.price-label {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.price-value {
    font-size: 56px;
    font-weight: 700;
    margin-bottom: 12px;
}

.price-currency {
    font-size: 24px;
    color: var(--text-secondary);
}

.price-savings {
    font-size: 16px;
    color: #38ef7d;
}

/* Rent Section */
.rent-section {
    padding: 120px 0;
}

.rent-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: start;
}

.rent-info h2 {
    font-size: 40px;
    font-weight: 700;
    margin-bottom: 16px;
}

.rent-info p {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 32px;
}

.info-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 16px;
}

.check-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--success-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.rent-form {
    position: sticky;
    top: 100px;
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 16px;
    transition: all 0.2s;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: rgba(255, 0, 128, 0.5);
    box-shadow: 0 0 0 4px rgba(255, 0, 128, 0.1);
}

.form-group select option {
    background: #1a1e3a;
    color: var(--text-primary);
}

.form-hint {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
}

.form-summary {
    background: rgba(255, 0, 128, 0.1);
    border: 1px solid rgba(255, 0, 128, 0.3);
    border-radius: var(--radius-md);
    padding: 20px;
    margin-bottom: 24px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    font-size: 18px;
    font-weight: 600;
}

.payment-modal.hidden {
    display: none;
}

.modal-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.modal-header h3 {
    font-size: 1.75rem;
    margin: 0;
    color: var(--text-primary);
}

.payment-address {
    display: flex;
    gap: 12px;
    margin: 16px 0;
}

.payment-address code {
    flex: 1;
    padding: 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-sm);
    font-size: 14px;
    word-break: break-all;
}

.payment-address button {
    padding: 12px 24px;
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    cursor: pointer;
}

.payment-status {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: rgba(56, 239, 125, 0.1);
    border-radius: var(--radius-md);
    margin: 16px 0;
}

.spinner {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(56, 239, 125, 0.3);
    border-top-color: #38ef7d;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.btn-loading-spinner {
    width: 16px;
    height: 16px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

.payment-note {
    font-size: 14px;
    color: var(--text-muted);
}

/* Footer */
.footer {
    padding: 80px 0 40px;
    border-top: 1px solid var(--border-glass);
    background: rgba(0, 0, 0, 0.2);
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 3fr;
    gap: 80px;
    margin-bottom: 40px;
}

.footer-brand p {
    color: var(--text-secondary);
    margin-top: 12px;
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}

.footer-col h4 {
    font-size: 16px;
    margin-bottom: 16px;
}

.footer-col a {
    display: block;
    color: var(--text-secondary);
    text-decoration: none;
    margin-bottom: 12px;
    transition: color 0.2s;
}

.footer-col a:hover {
    color: var(--text-primary);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 32px;
    border-top: 1px solid var(--border-glass);
    color: var(--text-muted);
}

.footer-social {
    display: flex;
    gap: 24px;
}

.footer-social a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-social a:hover {
    color: var(--text-primary);
}

/* Responsive */
@media (max-width: 1024px) {
    .hero .container,
    .rent-container {
        grid-template-columns: 1fr;
        gap: 40px;
    }

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

    .hero-title {
        font-size: 48px;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

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

    .hero-stats {
        grid-template-columns: repeat(3, 1fr);
        gap: 16px;
    }

    .stat-value {
        font-size: 24px;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }

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

/* Orders Page */
.orders-section {
    padding: 120px 0 80px;
    min-height: 100vh;
}

.orders-section h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.orders-section .subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

.filter-container {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2rem;
    padding: 1rem;
    background: var(--bg-card);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-glass);
    flex-wrap: wrap;
}

.filter-container label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    color: var(--text-secondary);
    transition: color 0.3s;
}

.filter-container label:hover {
    color: var(--text-primary);
}

.filter-container input[type="radio"] {
    cursor: pointer;
    width: 18px;
    height: 18px;
}

#orders-container {
    display: grid;
    gap: 1.5rem;
}

.order-card {
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    backdrop-filter: blur(10px);
    transition: transform 0.3s, box-shadow 0.3s;
}

.order-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-glass);
}

.order-header h3 {
    font-size: 1.5rem;
    color: var(--text-primary);
}

.status-badge {
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    color: white;
}

.order-details {
    display: grid;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
}

.detail-label {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.detail-value {
    color: var(--text-primary);
    font-weight: 500;
    text-align: right;
    word-break: break-all;
    max-width: 60%;
}

.delegations-list {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-glass);
    display: grid;
    gap: 0.75rem;
}

.delegation-item {
    background: rgba(255, 255, 255, 0.03);
    padding: 1rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-glass);
}

.delegation-item p {
    margin: 0.25rem 0;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.delegation-item strong {
    color: var(--text-primary);
}

.delegation-item a {
    color: #4CAF50;
    text-decoration: none;
}

.delegation-item a:hover {
    text-decoration: underline;
}

.nav-links a.active {
    color: #4CAF50;
    font-weight: 600;
}

/* Orders Table */
.table-container {
    overflow-x: auto;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-glass);
    backdrop-filter: blur(10px);
}

.orders-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.orders-table thead {
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 2px solid var(--border-glass);
}

.orders-table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
}

.orders-table tbody tr {
    border-bottom: 1px solid var(--border-glass);
    transition: background 0.2s;
}

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

.orders-table tbody tr:last-child {
    border-bottom: none;
}

.orders-table td {
    padding: 1rem;
    color: var(--text-secondary);
    vertical-align: middle;
}

.orders-table td[onclick] {
    transition: all 0.2s;
}

.orders-table td[onclick]:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 13px;
    white-space: nowrap;
}

.btn-secondary:disabled {
    background: rgba(100, 100, 100, 0.3);
    color: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.1);
    cursor: not-allowed;
    opacity: 0.5;
}

.btn-secondary:disabled:hover {
    transform: none;
    background: rgba(100, 100, 100, 0.3);
}

/* Loader */
.loader {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--text-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 2rem auto;
}

/* Modal Overlay */
.payment-modal:not(.hidden) {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 2rem;
}

.payment-modal .modal-content {
    background: var(--bg-dark);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-xl);
    padding: 2.5rem;
    max-width: 550px;
    width: 100%;
    backdrop-filter: blur(20px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.modal-content h3 {
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    color: var(--text-primary);
}

.modal-content p {
    margin: 0.75rem 0;
    color: var(--text-secondary);
    line-height: 1.6;
}

.modal-content strong {
    color: var(--text-primary);
}

.payment-modal .btn-full {
    margin-top: 1rem;
}

.payment-modal .btn-secondary.btn-full {
    margin-bottom: 0.5rem;
}

@media (max-width: 768px) {
    .filter-container {
        flex-direction: column;
        gap: 1rem;
    }

    .detail-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }

    .detail-value {
        max-width: 100%;
    }

    .order-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .orders-table {
        font-size: 0.85rem;
    }

    .orders-table th,
    .orders-table td {
        padding: 0.75rem 0.5rem;
    }

    .btn-sm {
        padding: 6px 12px;
        font-size: 12px;
    }
}
