* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

*::-webkit-scrollbar {
    display: none;
}

:root {
    --bg-main: #050505;
    --bg-secondary: #121212;
    --bg-card: #1a1a1a;
    --primary-red: #ff0000;
    --primary-red-dark: #cc0000;
    --primary-red-light: #330000;
    --text-main: #ffffff;
    --text-secondary: #aaaaaa;
    --text-muted: #666666;
    --border-light: #333333;
    --border-focus: #ff0000;
    --shadow-soft: 0 4px 24px rgba(0, 0, 0, 0.5);
    --shadow-hover: 0 8px 32px rgba(0, 0, 0, 0.7);
    --shadow-red: 0 4px 20px rgba(255, 0, 0, 0.4);
    --shadow-glow: 0 0 20px rgba(255, 0, 0, 0.6);
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 12px;
    --radius-xl: 18px;
    --radius-full: 999px;
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

body {
    font-family: var(--font-main);
    background: var(--bg-main);
    color: var(--text-main);
    line-height: 1.6;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
    padding-bottom: env(safe-area-inset-bottom);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transform: scale(0.998);
    transform-origin: top left;
    width: 100.2%;
}

body.has-banner {
    padding-bottom: 80px;
}

.app-container {
    position: relative;
    margin: 0 auto;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    z-index: 2;
    max-width: 1200px;
}

.app-header {
    background: rgba(5, 5, 5, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-light);
    padding: 1rem 1.2rem;
    text-align: center;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.4rem;
    width: 100%;
}

.header-top h1 {
    font-size: 1.25rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: -0.5px;
    color: var(--text-main);
    position: relative;
    display: inline-block;
    background: linear-gradient(135deg, var(--text-main) 0%, var(--primary-red) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.header-top h1::before {
    content: '✦';
    position: absolute;
    left: -16px;
    color: var(--primary-red);
    font-size: 1rem;
    -webkit-text-fill-color: var(--primary-red);
    text-shadow: 0 0 10px var(--primary-red);
}

.header-top h1::after {
    content: '✦';
    position: absolute;
    right: -16px;
    color: var(--primary-red);
    font-size: 1rem;
    -webkit-text-fill-color: var(--primary-red);
    text-shadow: 0 0 10px var(--primary-red);
}

.balance-display {
    display: flex;
    align-items: center;
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    padding: 0.4rem 0.8rem;
    border-radius: var(--radius-full);
    position: relative;
    overflow: hidden;
    transition: var(--transition);
    cursor: default;
}

.balance-display:hover {
    border-color: var(--border-light);
    background: var(--bg-secondary);
    box-shadow: none;
    transform: none;
}

.balance-icon {
    font-size: 1rem;
    margin-right: 0.4rem;
    color: var(--primary-red);
    text-shadow: 0 0 10px rgba(255, 0, 0, 0.5);
}

.balance-value {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text-main);
    font-feature-settings: "tnum";
}

.user-greeting {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.topup-header-btn {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.topup-header-btn:hover {
    border-color: var(--primary-red);
    color: var(--primary-red);
    box-shadow: var(--shadow-glow);
}

.topup-header-btn:active {
    transform: scale(0.95);
}

.topup-icon {
    color: var(--text-main);
    font-size: 1rem;
    font-weight: 700;
    line-height: 1;
    transition: var(--transition);
}

.topup-header-btn:hover .topup-icon {
    color: var(--primary-red);
}

.app-main {
    flex: 1;
    padding: 1.5rem 1.2rem;
    position: relative;
}

.main-menu {
    animation: fadeInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.menu-section {
    margin-bottom: 2rem;
}

.section-title {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    margin-bottom: 0.8rem;
    padding-left: 0.4rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    position: relative;
}

.section-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 4px;
    background: var(--primary-red);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--primary-red);
}

.menu-grid {
    display: grid;
    gap: 0.8rem;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.menu-btn {
    display: flex;
    align-items: center;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 1rem;
    cursor: pointer;
    transition: var(--transition);
    text-align: left;
    width: 100%;
    color: var(--text-main);
    position: relative;
    overflow: hidden;
}

.menu-btn:hover {
    border-color: var(--primary-red);
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
}

.menu-btn:active {
    transform: translateY(0);
}

.menu-icon {
    font-size: 1.5rem;
    margin-right: 1rem;
    min-width: 35px;
    text-align: center;
    color: var(--text-main);
    transition: var(--transition);
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.menu-btn:hover .menu-icon {
    color: #fff;
    transform: scale(1.1);
    background: var(--primary-red);
    box-shadow: var(--shadow-glow);
}

.menu-text {
    display: flex;
    flex-direction: column;
}

.menu-text strong {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.2rem;
    color: var(--text-main);
}

.menu-text small {
    font-size: 0.75rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.reading-screen,
.balance-screen,
.history-screen,
.help-screen,
.apps-menu {
    animation: fadeInUp 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
}

.hidden {
    display: none !important;
}

.reading-header,
.balance-header,
.history-header,
.help-header {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
}

.back-btn {
    background: transparent;
    border: 1px solid var(--border-light);
    color: var(--text-main);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    padding: 0.4rem 1rem;
    margin-right: 0.8rem;
    border-radius: var(--radius-full);
    transition: var(--transition);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.back-btn:hover {
    background: var(--primary-red);
    color: #fff;
    border-color: var(--primary-red);
    transform: translateX(-4px);
    box-shadow: var(--shadow-glow);
}

.reading-header h2,
.balance-header h2,
.history-header h2,
.help-header h2 {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-main);
    text-transform: uppercase;
    letter-spacing: -0.5px;
}

.reading-content {
    padding: 0.8rem 0;
}

.question-section {
    text-align: center;
    position: relative;
    margin-bottom: 1.5rem;
}

.question-label {
    font-size: 0.9rem;
    margin-bottom: 0.8rem;
    color: var(--text-secondary);
    font-weight: 500;
}

#questionInput {
    width: 100%;
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 1rem;
    color: var(--text-main);
    font-size: 0.9rem;
    min-height: 100px;
    resize: vertical;
    margin-bottom: 1.2rem;
    transition: var(--transition);
    font-family: inherit;
}

#questionInput:focus {
    outline: none;
    border-color: var(--primary-red);
    background: var(--bg-card);
    box-shadow: var(--shadow-red);
}

.action-btn {
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    width: 100%;
    max-width: 280px;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
}

.action-btn.primary {
    background: var(--primary-red);
    color: #fff;
    box-shadow: var(--shadow-red);
}

.action-btn.primary:hover {
    background: var(--primary-red-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(255, 0, 0, 0.6);
}

.shuffle-section {
    text-align: center;
    padding: 3rem 0;
}

.shuffle-animation {
    margin-bottom: 1.5rem;
}

.card-back {
    width: 120px;
    height: 180px;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    margin: 0 auto;
    box-shadow: var(--shadow-soft);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: float 3s ease-in-out infinite;
}

.card-back::before {
    content: '✦';
    font-size: 2.5rem;
    color: var(--primary-red);
    opacity: 0.8;
    text-shadow: 0 0 15px var(--primary-red);
}

.shuffle-text {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.5px;
}

.result-section {
    text-align: center;
}

.reading-message-top {
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 1.2rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.reading-message-top p {
    margin-bottom: 0.4rem;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.reading-message-top strong {
    color: var(--text-main);
    font-size: 1rem;
    font-weight: 700;
}

.reading-message-top .balance-info {
    color: var(--primary-red);
    font-size: 0.8rem;
    margin-top: 0.8rem;
    font-weight: 600;
}

.cards-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.card-display {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 1.2rem;
    max-width: 300px;
    width: 100%;
    animation: fadeInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    box-shadow: var(--shadow-soft);
    transition: var(--transition);
}

.card-display:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-4px);
    border-color: var(--primary-red);
}

.card-image {
    width: 100%;
    height: 260px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    margin-bottom: 1rem;
    background: var(--bg-secondary);
    box-shadow: 0 2px 10px rgba(0,0,0,0.5);
    filter: brightness(0.9);
}

.card-display:hover .card-image {
    filter: brightness(1.1);
}

.card-name {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 0.4rem;
    text-transform: uppercase;
    letter-spacing: -0.5px;
}

.card-position {
    font-size: 0.75rem;
    color: var(--primary-red);
    margin-bottom: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    background: var(--primary-red-light);
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: var(--radius-full);
}

.card-meaning {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.6;
    text-align: left;
    margin-bottom: 0.8rem;
}

.card-advice {
    font-size: 0.8rem;
    color: var(--text-main);
    line-height: 1.5;
    text-align: left;
    padding: 0.8rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--primary-red);
}

.card-warning {
    font-size: 0.8rem;
    color: #fff;
    line-height: 1.5;
    text-align: left;
    padding: 0.8rem;
    background: var(--primary-red);
    border-radius: var(--radius-sm);
    margin-top: 0.4rem;
    box-shadow: var(--shadow-red);
}

.reading-interpretation {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    margin-top: 1.5rem;
    text-align: left;
    box-shadow: var(--shadow-soft);
}

.reading-interpretation h4 {
    color: var(--text-main);
    margin-bottom: 1.2rem;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 800;
    border-bottom: 2px solid var(--primary-red);
    display: inline-block;
    padding-bottom: 0.4rem;
}

.reading-interpretation .card-interpretation {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-light);
}

.reading-interpretation .card-interpretation:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.reading-interpretation h5 {
    color: var(--text-main);
    font-size: 0.9rem;
    margin-bottom: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 700;
}

.reading-interpretation p {
    color: var(--text-secondary);
    font-size: 0.85rem;
    line-height: 1.7;
    margin-bottom: 0.4rem;
}

.balance-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.balance-card {
    background: linear-gradient(135deg, #1a1a1a 0%, #000000 100%);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 2rem;
    text-align: center;
    color: #fff;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-hover);
}

.balance-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255,0,0,0.2) 0%, transparent 70%);
    filter: blur(40px);
}

.balance-amount {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 0.4rem;
    margin-bottom: 0.4rem;
    position: relative;
    z-index: 1;
}

.balance-big {
    font-size: 2.5rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: -2px;
    text-shadow: 0 0 20px rgba(255,255,255,0.3);
}

.balance-currency {
    font-size: 1.5rem;
    color: var(--primary-red);
    font-weight: 700;
    text-shadow: 0 0 15px var(--primary-red);
}

.balance-status {
    font-size: 0.85rem;
    opacity: 0.8;
    color: #fff;
    letter-spacing: 0.5px;
    position: relative;
    z-index: 1;
}

.topup-section,
.tariffs-section {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    position: relative;
    box-shadow: var(--shadow-soft);
}

.topup-section h3,
.tariffs-section h3 {
    font-size: 1rem;
    margin-bottom: 0.8rem;
    color: var(--text-main);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 800;
}

.topup-hint {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 1.2rem;
}

.topup-input-group {
    display: flex;
    gap: 0.6rem;
    margin-bottom: 1.2rem;
}

#topupAmount {
    flex: 1;
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    padding: 0.8rem;
    color: var(--text-main);
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
}

#topupAmount:focus {
    outline: none;
    border-color: var(--primary-red);
    background: var(--bg-card);
}

.quick-amounts {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.6rem;
}

.quick-amount-btn {
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    padding: 0.6rem;
    color: var(--text-main);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.quick-amount-btn:hover {
    border-color: var(--primary-red);
    color: var(--primary-red);
    background: var(--bg-card);
    box-shadow: var(--shadow-red);
}

.tariffs-list {
    list-style: none;
    padding: 0;
}

.tariffs-list li {
    display: flex;
    justify-content: space-between;
    padding: 0.8rem 0;
    border-bottom: 1px solid var(--border-light);
    font-size: 0.9rem;
}

.tariffs-list li:last-child {
    border-bottom: none;
}

.tariff-value {
    color: var(--primary-red);
    font-weight: 700;
}

.history-content {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.history-item {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 1rem;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
}

.history-item:hover {
    border-color: var(--primary-red);
    box-shadow: var(--shadow-soft);
    transform: translateX(4px);
}

.history-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 1rem;
    bottom: 1rem;
    width: 3px;
    background: var(--border-light);
    transition: var(--transition);
    border-radius: 0 4px 4px 0;
}

.history-item:hover::before {
    background: var(--primary-red);
    box-shadow: 2px 0 10px var(--primary-red);
}

.history-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.4rem;
}

.history-type {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text-main);
}

.history-date {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-feature-settings: "tnum";
}

.history-cards {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.history-empty {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    border: 2px dashed var(--border-light);
    border-radius: var(--radius-md);
}

.help-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.help-section {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    box-shadow: var(--shadow-soft);
}

.help-section h3 {
    font-size: 1rem;
    margin-bottom: 0.8rem;
    color: var(--text-main);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 800;
}

.help-section p,
.help-section ol,
.help-section ul {
    color: var(--text-secondary);
    font-size: 0.85rem;
    line-height: 1.7;
}

.help-section ol,
.help-section ul {
    padding-left: 1.2rem;
}

.help-section li {
    margin-bottom: 0.4rem;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1.2rem;
    opacity: 0;
    animation: fadeIn 0.3s forwards;
}

.modal {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 2rem;
    max-width: 380px;
    width: 100%;
    text-align: center;
    animation: scaleIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
    position: relative;
}

.modal-content {
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-secondary);
    white-space: pre-line;
}

.modal-close {
    background: var(--primary-red);
    border: none;
    border-radius: var(--radius-full);
    padding: 0.8rem 2rem;
    color: #fff;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.8rem;
    width: 100%;
    box-shadow: var(--shadow-red);
}

.modal-close:hover {
    background: var(--primary-red-dark);
    transform: scale(1.05);
    box-shadow: var(--shadow-glow);
}

.app-footer {
    text-align: center;
    padding: 1.5rem;
    color: var(--text-muted);
    font-size: 0.75rem;
    border-top: 1px solid var(--border-light);
    position: relative;
    letter-spacing: 0.5px;
    margin-top: auto;
}

.app-footer::before {
    content: '✦';
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--primary-red);
    background: var(--bg-main);
    padding: 0 10px;
    text-shadow: 0 0 10px var(--primary-red);
}

.hero-section {
    text-align: center;
    margin-bottom: 2.5rem;
    position: relative;
    padding: 1.5rem 1rem;
}

.hero-title {
    font-size: 2rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-main);
    margin-bottom: 0.4rem;
    position: relative;
}

.hero-title::before {
    content: attr(data-text);
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    color: var(--primary-red);
    filter: blur(15px);
    opacity: 0.4;
    z-index: -1;
}

.hero-subtitle {
    font-size: 1rem;
    color: var(--text-secondary);
    letter-spacing: 1px;
    margin-bottom: 0.8rem;
    text-transform: uppercase;
}

.hero-decoration {
    display: flex;
    justify-content: center;
    gap: 0.8rem;
    font-size: 1.2rem;
}

.decoration-star {
    color: var(--primary-red);
    animation: pulse 2s infinite;
    text-shadow: 0 0 15px var(--primary-red);
}

.decoration-star:nth-child(2) {
    animation-delay: 0.5s;
    color: var(--primary-red-dark);
}

.decoration-star:nth-child(3) {
    animation-delay: 1s;
}

.apps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.2rem;
    margin-bottom: 2.5rem;
}

.app-card {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 1.5rem 1.2rem;
    transition: var(--transition);
    cursor: pointer;
    overflow: hidden;
    z-index: 1;
    text-align: center;
}

.app-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--primary-red);
    transform: scaleX(0);
    transition: var(--transition);
    transform-origin: left;
    box-shadow: 0 0 10px var(--primary-red);
}

.app-card:hover {
    transform: translateY(-8px);
    border-color: var(--primary-red);
    box-shadow: var(--shadow-hover);
}

.app-card:hover::before {
    transform: scaleX(1);
}

.app-card-glow {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle, rgba(255, 0, 0, 0.1) 0%, transparent 70%);
    opacity: 0;
    transition: var(--transition);
    pointer-events: none;
}

.app-card:hover .app-card-glow {
    opacity: 1;
}

.app-card-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.app-icon {
    font-size: 3.5rem;
    margin-bottom: 0.8rem;
    color: var(--primary-red);
    filter: drop-shadow(0 0 15px rgba(255, 0, 0, 0.4));
    animation: float 6s ease-in-out infinite;
}

.app-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.6rem;
    color: var(--text-main);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.app-description {
    color: var(--text-secondary);
    font-size: 0.85rem;
    line-height: 1.6;
    margin-bottom: 0.8rem;
    opacity: 0.9;
}

.app-features {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.4rem;
    margin-bottom: 1.2rem;
}

.feature-tag {
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-full);
    padding: 0.2rem 0.6rem;
    font-size: 0.7rem;
    color: var(--text-secondary);
    letter-spacing: 0.5px;
    transition: var(--transition);
}

.feature-tag:hover {
    border-color: var(--primary-red);
    color: var(--primary-red);
    background: var(--primary-red-light);
    box-shadow: 0 0 10px rgba(255, 0, 0, 0.3);
}

.app-btn {
    background: transparent;
    border: 2px solid var(--primary-red);
    border-radius: var(--radius-full);
    padding: 0.6rem 1.5rem;
    color: var(--primary-red);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.app-btn:hover {
    background: var(--primary-red);
    color: #fff;
    box-shadow: var(--shadow-glow);
    transform: scale(1.05);
}

.btn-icon {
    transition: var(--transition);
}

.app-btn:hover .btn-icon {
    transform: translateX(5px);
}

.app-card-coming-soon {
    opacity: 0.8;
    cursor: default;
    filter: grayscale(50%);
}

.app-card-coming-soon:hover {
    transform: translateY(-5px);
    border-color: var(--text-muted);
    box-shadow: var(--shadow-soft);
}

.coming-soon-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-full);
    padding: 0.4rem 1.2rem;
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 1px;
    margin-top: 0.4rem;
}

.badge-glow {
    color: var(--text-secondary);
    animation: pulse 2s infinite;
    font-size: 0.7rem;
}

.info-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.2rem;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-light);
    position: relative;
}

.info-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 1.2rem;
    text-align: center;
    transition: var(--transition);
}

.info-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-red);
    box-shadow: var(--shadow-soft);
}

.info-icon {
    font-size: 2rem;
    margin-bottom: 0.4rem;
    color: var(--primary-red);
    text-shadow: 0 0 15px rgba(255, 0, 0, 0.4);
}

.info-card h3 {
    font-size: 1rem;
    margin-bottom: 0.4rem;
    color: var(--text-main);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.info-card p {
    color: var(--text-secondary);
    font-size: 0.8rem;
    line-height: 1.6;
}

.app-navigation {
    margin-bottom: 1.2rem;
    display: flex;
    justify-content: flex-start;
}

.back-to-apps-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-full);
    padding: 0.6rem 1.2rem;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    background: linear-gradient(90deg, var(--primary-red) 0%, var(--primary-red) 43%, var(--text-main) 43%, var(--text-main) 100%);
    -webkit-background-clip: text;
    color: transparent;
    border-color: var(--border-light);
}

.back-to-apps-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, var(--primary-red), var(--primary-red-dark));
    opacity: 0;
    transition: var(--transition);
    z-index: -1;
}

.back-to-apps-btn:hover {
    border-color: var(--primary-red);
    box-shadow: var(--shadow-glow);
    transform: translateX(-5px);
    background: linear-gradient(90deg, var(--primary-red) 0%, var(--primary-red) 43%, var(--text-main) 43%, var(--text-main) 100%);
    -webkit-background-clip: text;
    color: transparent;
}

.back-to-apps-btn:hover::before {
    opacity: 0.1;
}

.back-icon {
    font-size: 1.1rem;
    transition: var(--transition);
    color: var(--primary-red);
}

.back-to-apps-btn:hover .back-icon {
    transform: translateX(-3px);
    color: var(--primary-red);
}

.back-text {
    font-weight: 700;
}

.loading {
    text-align: center;
    color: var(--primary-red);
    padding: 1.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 1px;
    position: relative;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
}

.loading::before {
    content: '';
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid var(--border-light);
    border-top-color: var(--primary-red);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    box-shadow: 0 0 10px rgba(255, 0, 0, 0.3);
}

.error-message {
    background: rgba(255, 0, 0, 0.1);
    border: 1px solid var(--primary-red);
    border-radius: var(--radius-sm);
    padding: 0.8rem;
    color: #ff6666;
    text-align: center;
    margin: 0.8rem 0;
    font-weight: 500;
}

.success-message {
    background: rgba(0, 255, 0, 0.1);
    border: 1px solid #00cc00;
    border-radius: var(--radius-sm);
    padding: 0.8rem;
    color: #66ff66;
    text-align: center;
    margin: 0.8rem 0;
    font-weight: 500;
}

.card-display[data-position="upright"]::after {
    content: '▲';
    position: absolute;
    top: 0.8rem;
    right: 0.8rem;
    color: var(--text-main);
    font-size: 0.9rem;
    opacity: 0.5;
}

.card-display[data-position="reversed"]::after {
    content: '▼';
    position: absolute;
    top: 0.8rem;
    right: 0.8rem;
    color: var(--primary-red);
    font-size: 0.9rem;
    opacity: 1;
    font-weight: 800;
    text-shadow: 0 0 10px var(--primary-red);
}

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

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

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

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.5;
        transform: scale(1.1);
    }
}

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

@media (max-width: 768px) {
    .header-top h1 {
        font-size: 1.1rem;
    }

    .header-top h1::before,
    .header-top h1::after {
        display: none;
    }

    .balance-display {
        padding: 0.3rem 0.6rem;
    }

    .menu-btn {
        padding: 0.8rem;
    }

    .menu-icon {
        font-size: 1.2rem;
        min-width: 30px;
    }

    .menu-text strong {
        font-size: 0.85rem;
    }

    .balance-big {
        font-size: 2rem;
    }

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

    .card-image {
        height: 220px;
    }

    .modal {
        padding: 1.2rem;
    }

    .hero-title {
        font-size: 1.5rem;
        letter-spacing: 1px;
    }

    .hero-subtitle {
        font-size: 0.8rem;
        letter-spacing: 0.5px;
    }

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

    .app-card {
        padding: 1.2rem 0.8rem;
    }

    .app-icon {
        font-size: 2.5rem;
    }

    .app-title {
        font-size: 1.1rem;
    }

    .info-section {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .app-header {
        padding: 0.8rem;
        flex-direction: column;
        gap: 0.8rem;
    }

    .header-top {
        flex-direction: column;
        gap: 0.8rem;
    }

    .topup-header-btn {
        width: 30px;
        height: 30px;
    }

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

    .hero-title {
        font-size: 1.2rem;
        letter-spacing: 0.5px;
    }

    .app-features {
        flex-direction: column;
        align-items: center;
    }

    .feature-tag {
        width: fit-content;
    }

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

    .back-text {
        display: none;
    }

    .back-to-apps-btn {
        padding: 0.6rem;
        border-radius: 50%;
        width: 40px;
        height: 40px;
        justify-content: center;
    }

    .back-icon {
        margin: 0;
        font-size: 1.2rem;
    }

    .app-main {
        padding: 1.2rem 0.8rem;
    }

    .action-btn {
        width: 100%;
    }

    .card-display {
        padding: 0.8rem;
    }

    .card-image {
        height: 220px;
    }
}