:root {
    --primary: #3f92c8;
    --primary-light: #439dd8;
    --secondary: #2e78a7;
    --dark: #1b263b;
    --light: #f8f9fa;
    --success: #4cc9f0;
    --warning: #f8961e;
    --danger: #f72585;
    --gray: #adb5bd;
    --white: #ffffff;
    --gold: #ffd700;
}

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

body {
    background-color: #f0f2f5;
    /*font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
            color: var(--dark);
            line-height: 1.6;*/
}

.rewards-wraper-1 {
    padding: 65px 0;
}

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

.top-sec {
    text-align: center;
    margin-bottom: 2rem;
    animation: fadeInDown 0.8s ease-out;
}

.logo-icon {
    font-size: 2.5rem;
    line-height: 1;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

h1 {
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 0.5rem;
}

.top-sec h1 {
    font-size: 32px;
}

.subtitle {
    color: var(--gray);
    font-size: 1.1rem;
}

.card-input-section {
    background: var(--white);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    margin-bottom: 2rem;
    text-align: center;
    animation: fadeIn 0.8s ease-out;
    transition: all 0.3s ease;
}

.card-input-section:hover {
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

.input-group {
    position: relative;
    max-width: 400px;
    margin: 0 auto;
}

.card-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray);
    font-size: 1.2rem;
}

#cardNumber {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    font-size: 1.1rem;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    transition: all 0.3s ease;
    letter-spacing: 1px;
}

#cardNumber:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.2);
    outline: none;
}

#cardNumber::placeholder {
    color: var(--gray);
    opacity: 0.7;
}

.btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 1rem 2rem;
    font-size: 1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    margin-top: 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn:hover {
    background: var(--secondary);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(67, 97, 238, 0.3);
    color: #fff;
}

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

.error {
    color: var(--danger);
    margin-top: 1rem;
    font-size: 0.9rem;
    min-height: 1.2rem;
    animation: shake 0.5s ease-in-out;
}

.dashboard {
    display: none;
    opacity: 0;
    animation: fadeInUp 0.8s ease-out forwards;
    animation-delay: 0.3s;
}

.customer-card {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 10px 30px rgba(67, 97, 238, 0.2);
    position: relative;
    overflow: hidden;
}

.customer-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0) 70%);
    transform: rotate(30deg);
}

.customer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.customer-name {
    font-size: 1.8rem;
    font-weight: 600;
}

.customer-id {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
}

.customer-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.detail-card {
    background: rgba(255, 255, 255, 0.1);
    padding: 1rem;
    border-radius: 8px;
    backdrop-filter: blur(5px);
}

.detail-label {
    font-size: 0.9rem;
    opacity: 0.8;
    margin-bottom: 0.5rem;
}

.detail-value {
    font-size: 1.3rem;
    font-weight: 600;
}

.points-value {
    color: var(--success);
}

.section-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 2rem 0 1rem;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-title i {
    color: var(--primary);
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.reward-card {
    background: var(--white);
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    border-left: 4px solid var(--primary);
    position: relative;
    overflow: hidden;
}

.reward-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.reward-card.redeemed {
    opacity: 0.7;
    border-left-color: var(--gray);
}

.reward-card.redeemed::after {
    content: 'REDEEMED';
    position: absolute;
    top: 15px;
    right: -45px;
    background: var(--gray);
    color: white;
    padding: 0.2rem 2.5rem;
    font-size: 0.7rem;
    font-weight: bold;
    transform: rotate(45deg);
}

.reward-name {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--dark);
}

.reward-description {
    color: var(--gray);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.reward-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 1rem;
}

.reward-detail {
    font-size: 0.9rem;
}

.reward-detail-label {
    color: var(--gray);
    margin-bottom: 0.2rem;
}

.reward-code {
    background: var(--light);
    padding: 0.3rem 0.5rem;
    border-radius: 4px;
    font-family: monospace;
    font-weight: bold;
    color: var(--primary);
}

.transaction-list {
    background: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.transaction-item {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    padding: 1rem 1.5rem;
    align-items: center;
    border-bottom: 1px solid #f1f3f5;
    transition: all 0.3s ease;
}

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

.transaction-item:hover {
    background: #f8f9fa;
}

.transaction-location {
    font-weight: 600;
}

.transaction-date {
    color: var(--gray);
    font-size: 0.9rem;
}

.transaction-amount {
    text-align: right;
    font-weight: 600;
}

.transaction-points {
    text-align: right;
    color: var(--success);
    font-weight: 600;
}

.loading {
    display: none;
    text-align: center;
    margin: 2rem 0;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(67, 97, 238, 0.2);
    border-radius: 50%;
    border-top-color: var(--primary);
    animation: spin 1s ease-in-out infinite;
    margin: 0 auto 1rem;
}

.available-rewards-section {
    display: none;
    margin-top: 3rem;
    background: var(--white);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    animation: slideInUp 0.8s ease-out;
}

.available-rewards-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.available-rewards-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.available-rewards-title i {
    color: var(--primary);
}

.available-rewards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.available-reward-card {
    background: var(--white);
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
}

.available-reward-card.locked {
    opacity: 0.5;
    filter: grayscale(30%);
    transform: scale(0.98);
    transition: all 0.3s ease;
}


.available-reward-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.available-reward-card.unlockable {
    border-color: var(--success);
}

.reward-image-placeholder {
    height: 120px;
    background: linear-gradient(135deg, #f5f7fa, #e4e8eb);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    color: var(--gray);
    font-size: 2rem;
}

.reward-points-cost {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0.5rem 0;
    font-weight: 600;
}

.reward-points-cost i {
    color: var(--gold);
}

.points-needed {
    color: var(--danger);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.points-sufficient {
    color: var(--success);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.reward-additional-info {
    margin-top: 1rem;
    padding: 1rem;
    background: var(--light);
    border-radius: 8px;
    font-size: 0.9rem;
    line-height: 1.6;
}

.unlock-btn.redeemable {
    background: #29ba11;
    /* already defined as #4cc9f0 */
}

.unlock-btn.redeemable:hover {
    background: #229c0d;
    /* slightly darker hover effect */
}


.progress-container {
    height: 6px;
    background: #e9ecef;
    border-radius: 3px;
    margin: 0.5rem 0;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: var(--success);
    border-radius: 3px;
    transition: width 0.5s ease;
}

.unlock-btn {
    width: 100%;
    padding: 0.7rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 1rem;
}

.unlock-btn:hover {
    background: var(--secondary);
    transform: translateY(-2px);
}

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

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    20%,
    60% {
        transform: translateX(-5px);
    }

    40%,
    80% {
        transform: translateX(5px);
    }
}

.no-results-card {
    background: var(--white);
    border-radius: 10px;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    grid-column: 1 / -1;
}

.no-results-icon {
    font-size: 2rem;
    color: var(--gray);
    margin-bottom: 1rem;
}

.no-results-text {
    color: var(--gray);
    font-size: 1.1rem;
}

@media (max-width: 991px) {
    .top-sec h1 {
        font-size: 28px;
    }
}

@media (max-width: 768px) {
    .customer-details {
        grid-template-columns: 1fr;
    }

    .transaction-item {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .transaction-amount,
    .transaction-points {
        text-align: left;
    }

    .available-rewards-grid {
        grid-template-columns: 1fr;
    }

    .rewards-wraper-1 {
        padding: 50px 0 30px;
    }

    .top-sec h1 {
        font-size: 25px;
    }
}