@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');


/* General Body Styles */
body {
    font-family: 'Poppins', sans-serif;
    margin: 0;
    background-color: #1c1f3e;
    /* Dark blue background */
    color: #ffffff;
    overflow: hidden;
    /* Hide scrollbars */
    height: 100vh;
}

/* Header and Navigation */
.main-header {
    padding-top: 20px;

}

.main-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 70%;
    margin: 0 auto;
    background-color: #2a2d4a;
    /* Darker nav background */
    padding: 15px 30px;
    border-radius: 50px;
}

.nav-logo a {
    color: #ffffff;
    font-size: 22px;
    font-weight: 600;
    text-decoration: none;
}

.nav-links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-button {
    text-decoration: none;
    color: #ffffff;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 500;
    transition: background-color 0.3s;
}

.nav-button.signup {
    background-color: #a8ff78;
    /* Light green */
    color: #1c1f3e;
}

.nav-button.signup:hover {
    background-color: #8bcd62;
}


/* Hero Section */
.hero-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 10%;
    height: calc(100vh - 80px);
    /* Full height minus header */
}

.hero-content {
    max-width: 50%;
}

.hero-content h1 {
    font-size: 64px;
    font-weight: 700;
    line-height: 1.2;
    margin: 0;
}

.hero-content h1 span {
    color: #c788ff;
    /* Purple color */
}

.hero-content p {
    font-size: 16px;
    color: #e0e0e0;
    max-width: 450px;
    margin-top: 20px;
}

/* Hero Cards Decoration */
.hero-cards {
    position: relative;
    width: 450px;
    height: 500px;
}

.card-mockup {
    position: absolute;
    width: 300px;
    height: 190px;
    border-radius: 15px;
    padding: 70px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1.5px;

}

.card-1 {
    background-color: #383a59;
    top: 0;
    left: 20px;
    z-index: -10;
    transform: rotate(-20deg);
    background-image: url('assets/Generated\ Image\ October\ 02\,\ 2025\ -\ 3_12PM\ \(1\).png');
    background-size: cover;
    background-position: center;

}

.card-2 {
    /* We are replacing the purple gradient with your new image */
    background-image: url('assets/freepik--20251002093044cHBZ.png');
    background-size: cover;
    background-position: center;

    bottom: 0;
    right: 0;
    z-index: 10;
    transform: rotate(10deg);
}

.card-3 {
    /* We are replacing the purple gradient with your new image */
    background-image: url('assets/freepik--20251002132914kWb0.png');
    background-size: cover;
    background-position: center;


    bottom: 0;
    right: 0;
    z-index: 10;
    transform: rotate(10deg);
}

.card-mockup .card-header,
.card-mockup .card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;

}

.card-mockup .card-number {
    font-size: 16px;
    display: flex;
    gap: 15px;
}

/* === Login Page Styles (New Version) === */
.login-page-body {
    background-color: #36394e;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 95vh;
    overflow: hidden;
    color: #fff;
}

.login-container {
    display: flex;
    width: 980px;
    /* Increased width to give more space */
    height: 675px;
    background-color: #2a2d4a;
    border-radius: 20px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5);
    overflow: hidden;
}

.login-info-panel {
    flex-basis: 45%;
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    /* Muhiim u ah in qoraalku si fiican u dul fuulo */

    /* Kuwani waa sadarrada muhiimka ah ee sawirka galinaya */
    background-image: url('assets/unnamed\ \(8\).jpg');
    /* Hubi in magaca sawirku sax yahay */
    background-size: cover;
    /* Si sawirku u buuxiyo booska oo dhan */
    background-position: center;
    /* Si uu sawirku bartanka uga istaago */
}

/* Kani wuxuu ku darayaa dahaar madow oo khafiif ah si qoraalka si fiican loo akhriyo */
.login-info-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.3);
}

/* Wuxuu hubinayaa in qoraalka iyo badhamadu ay ka sarreeyaan dahaarka madow */
.login-info-panel .back-to-website,
.login-info-panel .info-content {
    position: relative;
    z-index: 2;
}

.back-to-website {
    color: #fff;
    text-decoration: none;
    background-color: #36394e;
    padding: 10px 16px;
    border-radius: 20px;
    align-self: flex-start;
    font-size: 14px;
    transition: background-color 0.3s;
}

.back-to-website:hover {
    background-color: #4a4d6b;
}

.info-content h2 {
    font-size: 24px;
    font-weight: 500;
    line-height: 1.4;
    max-width: 250px;
    /* Control text wrapping */
}

.login-form-panel {
    flex-basis: 55%;
    padding: 40px 60px;
    /* More horizontal padding */
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.form-wrapper.hidden {
    display: none;
}

.form-wrapper h2 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 10px;
    color: #fff;
}

.form-wrapper p {
    color: #b0b3c2;
    margin-bottom: 40px;
    /* More space */
}

.form-wrapper p a {
    color: #a366ff;
    /* A lighter purple for links */
    text-decoration: none;
    font-weight: 600;
}

.input-group {
    margin-bottom: 25px;
    /* More space between inputs */
}

.input-group label {
    display: block;
    color: #b0b3c2;
    margin-bottom: 8px;
    font-size: 14px;
    text-transform: uppercase;
    /* Uppercase labels */
    letter-spacing: 0.5px;
}

.input-group input {
    width: 100%;
    padding: 14px;
    border: none;
    background-color: #36394e;
    border-radius: 8px;
    color: #fff;
    font-size: 16px;
    box-sizing: border-box;
    /* Important for consistent sizing */
}

.input-group input:focus {
    outline: none;
    box-shadow: 0 0 0 2px #a366ff;
    /* Highlight on focus */
}

.password-group {
    position: relative;
}

/* Ensure the eye icon is aligned correctly with the new padding */
.toggle-password {
    position: absolute;
    top: 70%;
    right: 15px;
    transform: translateY(-50%);
    cursor: pointer;
    color: #7a7f95;
}

.form-button {
    width: 100%;
    padding: 16px;
    background-color: #8e44ad;
    border: none;
    border-radius: 8px;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s;
    margin-top: 20px;
}

.form-button:hover {
    background-color: #72318f;
}

/* Remove social login styles as they are no longer needed */
.social-login,
.social-buttons {
    display: none;
}

/* === Interactive Homepage Styles === */

/* This is the new container for the cards and envelope */
.hero-interactive-zone {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

}

.hover-instruction {
    color: #6a6f93;
    margin-top: 20px;
    font-size: 14px;
    transition: opacity 0.4s;
}

/* On hover, the instruction text fades out */
.hero-interactive-zone:hover .hover-instruction {
    opacity: 0;
}



/* Initial position for the cards (inside the envelope) */
.card-1 {
    transform: translateY(120px) rotate(10deg);
    left: 110px;
    /* top: 70px; */
    bottom: 70px;

}

.card-2 {
    transform: translateY(120px) rotate(-5deg);
    right: 13vh;
    top: 20px;
    z-index: 3;
    /* Card 2 starts on top of the envelope */
}

.card-3 {
    transform: translateY(120px) rotate(-5deg);
    right: 50vh;
    bottom: 70px;
    z-index: 3;
}

/* When hovering the zone, the cards slide out and fan out */
.hero-interactive-zone:hover .card-1 {
    /* transform: translateY(0) rotate(-10deg); */
    z-index: 4;
}

.hero-interactive-zone:hover .card-2 {
    /* transform: translateY(0) rotate(5deg); */
    z-index: 5;
}

.hero-interactive-zone:hover .card-3 {
    /* transform: translateY(0) rotate(5deg); */
    z-index: 8;
}

/* Style for when a card is being dragged */
.card-mockup.dragging {
    cursor: grabbing;
    z-index: 1000 !important;
    /* Make sure it's on top of everything */
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
}

/* === New Dynamic Effects Styles === */

/* -- Typewriter Effect -- */
.typing-text {
    color: #c788ff;
    /* Purple color for the changing text */
    position: relative;
}

/* Blinking cursor style */
.typing-text::after {
    content: '|';
    position: absolute;
    right: -10px;
    font-weight: 300;
    animation: blink 0.7s infinite;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

/* -- Congratulations Pop-up -- */
.congrats-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #a8ff78;
    /* Light green from nav button */
    color: #1c1f3e;
    padding: 20px 40px;
    border-radius: 15px;
    font-size: 24px;
    font-weight: 600;
    z-index: 2000;
    /* On top of everything */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    animation: fadeInOut 3s ease-in-out forwards;
}

@keyframes fadeInOut {
    0% {
        opacity: 0;
        transform: translate(-50%, -30%);
    }

    20% {
        opacity: 1;
        transform: translate(-50%, -50%);
    }

    80% {
        opacity: 1;
        transform: translate(-50%, -50%);
    }

    100% {
        opacity: 0;
        transform: translate(-50%, -70%);
    }
}

/* === Cards Page Styles === */
/* .cards-page-body {
    background-color: #1c1f3e;
    color: #fff;
    font-family: 'Poppins', sans-serif;
} */

/* === Cards Page Styles === */
.cards-page-body {
    background-color: #1c1f3e;
    color: #fff;
    font-family: 'Poppins', sans-serif;
    min-height: 100vh;
    /* This allows the body to grow taller than the screen */
    overflow-y: auto;
    /* This adds a vertical scrollbar ONLY when needed */
}


.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 5%;
    background-color: #2a2d4a;
    border-bottom: 1px solid #4a4d6b;

    /* These 3 new lines make the header stick to the top */
    position: sticky;
    top: 0;
    z-index: 100;
}

.profile-section {
    display: flex;
    align-items: center;
    gap: 15px;
    position: relative;
}

#profile-pic {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid #a366ff;
}

.profile-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

#user-name {
    font-weight: 600;
}

#user-email {
    font-size: 12px;
    color: #b0b3c2;
}

.profile-dropdown-btn {
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    font-size: 16px;
}

.dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    top: 110%;
    background-color: #36394e;
    min-width: 160px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    z-index: 1;
    border-radius: 8px;
}

.dropdown-content a {
    color: #fff;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
}

.dropdown-content a:hover {
    background-color: #4a4d6b;
}

.profile-dropdown:hover .dropdown-content {
    display: block;
}

.cards-dashboard {
    padding: 40px 5%;
}

.add-card-section h2,
.card-display-section h2 {
    font-size: 28px;
    margin-bottom: 30px;
}

.form-and-preview-container {
    display: flex;
    gap: 40px;
    align-items: flex-start;
}

/* Card Preview Styles */
.card-preview {
    width: 320px;
    height: 200px;
    border-radius: 15px;
    padding: 20px;
    background-color: #8e44ad;
    background-size: cover;
    background-position: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    flex-shrink: 0;
    color: #fff;
}

.card-preview-inner,
.saved-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
}

.card-preview .card-header,
.saved-card .card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    text-transform: uppercase;
    font-size: 12px;
    font-weight: 600;
}

.card-chip {
    width: 40px;
    height: auto;
}

.card-number-preview {
    display: flex;
    justify-content: space-between;
    font-size: 20px;
    letter-spacing: 2px;
}

.card-footer-preview {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.card-holder-preview,
.card-expiry-preview {
    display: flex;
    flex-direction: column;
}

.card-footer-preview .label {
    font-size: 10px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.7);
}

/* Form Styles */
#add-card-form {
    flex-grow: 1;
    max-width: 500px;
}

.form-row {
    display: flex;
    gap: 20px;
}

.form-row .input-group {
    flex: 1;
}

.card-number-wrapper {
    position: relative;
}

.card-type-logo {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    height: 24px;
}

.background-options {
    margin-top: 20px;
}

.preset-images {
    display: flex;
    gap: 10px;
    margin: 10px 0;
}

.bg-option {
    width: 60px;
    height: 40px;
    border-radius: 5px;
    cursor: pointer;
    border: 2px solid transparent;
    object-fit: cover;
}

.bg-option:hover {
    border-color: #a366ff;
}

.color-options {
    display: flex;
    align-items: center;
    gap: 10px;
}

#color-picker {
    border: none;
    background: none;
    width: 40px;
    height: 40px;
    cursor: pointer;
}

#upload-btn {
    background-color: #4a4d6b;
    border: none;
    color: #fff;
    padding: 8px 12px;
    border-radius: 5px;
    cursor: pointer;
}

.section-divider {
    border: none;
    height: 1px;
    background-color: #4a4d6b;
    margin: 60px 0;
}

/* Saved Card Grid */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
}

.saved-card-wrapper {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.saved-card {
    width: 100%;
    height: 200px;
    border-radius: 15px;
    padding: 20px;
    box-sizing: border-box;
}

.card-actions {
    display: flex;
    gap: 10px;
}

.edit-btn,
.save-btn {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
}

.edit-btn {
    background-color: #4a4d6b;
    color: #fff;
}

.save-btn {
    background-color: #a366ff;
    color: #fff;
}

/* === Toast Notification Styles === */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 8px;
    color: #fff;
    font-weight: 500;
    z-index: 1001;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

.toast.show {
    opacity: 1;
    transform: translateX(0%);
}

.toast.error {
    background-color: #e74c3c;
    /* Red for errors */
}

.toast.success {
    background-color: #2ecc71;
    /* Green for success */
}

/* === Cards Page Redesign Styles === */
.cards-page-body {
    background-color: #1c1f3e;
    color: #fff;
}

.dashboard-header .nav-logo a {
    color: #fff;
    font-size: 24px;
    text-decoration: none;
    font-weight: 600;
}

.profile-section {
    display: flex;
    align-items: center;
    gap: 15px;
}

.profile-initial {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: #4a4d6b;
    color: #fff;
    display: grid;
    place-items: center;
    font-weight: 600;
}

#user-email {
    color: #b0b3c2;
}

#logout-btn {
    color: #c788ff;
    text-decoration: none;
    font-weight: 500;
}

.collection-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.add-card-btn {
    background-color: #8e44ad;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
}

.saved-card {
    background-color: #2a2d4a;
    border-radius: 15px;
    padding: 25px;
    height: 220px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-sizing: border-box;
    font-family: 'Courier New', Courier, monospace;
}

.saved-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    color: #b0b3c2;
}

.saved-card-header img {
    height: 30px;
}

.saved-card-number {
    font-size: 24px;
    letter-spacing: 3px;
    color: #fff;
    text-align: center;
    margin: auto 0;
}

.saved-card-footer {
    display: flex;
    justify-content: space-between;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
}

.saved-card-footer .label {
    font-size: 12px;
    color: #b0b3c2;
    margin-bottom: 4px;
}

/* === Modal Styles === */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    display: grid;
    place-items: center;
}

.modal-content {
    background-color: #2a2d4a;
    padding: 40px;
    border-radius: 15px;
    width: 90%;
    max-width: 500px;
    position: relative;
}

.modal-content h2 {
    margin-top: 0;
}

.close-modal-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    color: #fff;
    font-size: 28px;
    cursor: pointer;
}

.modal-overlay.hidden {
    display: none;
}

/* === Spinner for Loading States === */
.spinner {
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top: 4px solid #fff;
    width: 24px;
    height: 24px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* === Card Visibility Toggle Styles === */
.saved-card {
    /* We add position: relative so we can place the eye icon inside it */
    position: relative;
}

.toggle-card-visibility {
    position: absolute;
    top: 2px;
    right: 15px;
    width: 32px;
    height: 32px;
    background-color: rgba(44, 42, 42, 0.1);
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: #fff;
    cursor: pointer;
    transition: background-color 0.2s;
    z-index: 5;
    /* Ensures it's clickable */
}

.toggle-card-visibility:hover {
    background-color: rgba(48, 45, 45, 0.2);
}


/* === New Color Picker Styles === */
.preset-colors {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.color-swatch {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid #4a4d6b;
    transition: transform 0.2s;
}

.color-swatch:hover {
    transform: scale(1.1);
}

.color-picker-input {
    width: 100%;
    height: 40px;
    border: none;
    padding: 0;
    background: none;
}

/* === Class for Cards with Light Backgrounds === */
.saved-card.dark-text .saved-card-header,
.saved-card.dark-text .saved-card-number,
.saved-card.dark-text .saved-card-footer div {
    color: #222;
    /* Dark text color */
}

.saved-card.dark-text .saved-card-footer .label {
    color: #555;
    /* Slightly lighter label color */
}