:root {
    --ksu-blue: #0084BD;
    --ksu-cream: #E3E0D2;
    --ksu-grey: #748995;
    --ksu-black: #000000;
    --white: #ffffff;
    --danger: #e84a41;
    --shadow-sm: 0 2px 12px rgba(0, 132, 189, 0.08);
    --shadow-md: 0 4px 16px rgba(0, 132, 189, 0.1);
    --shadow-lg: 0 6px 24px rgba(0, 132, 189, 0.15);
}

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

body {
    font-family: 'Tajawal', sans-serif;
    background: linear-gradient(135deg, var(--ksu-cream) 0%, #f0ede3 100%);
    min-height: 100vh;
    padding: 2rem 0;
    position: relative;
    overflow-x: hidden;
    color: var(--ksu-black);
}

.background-pattern {
    position: fixed;
    top: -50%;
    left: -10%;
    width: 80%;
    height: 150%;
    background: linear-gradient(
        135deg,
        transparent 0%,
        rgba(0, 132, 189, 0.15) 25%,
        rgba(0, 132, 189, 0.2) 50%,
        transparent 75%
    );
    transform: rotate(-15deg);
    pointer-events: none;
    z-index: 0;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
    padding: 0 1rem;
}

.header-section {
    background: var(--white);
    border-radius: 20px;
    padding: 3rem 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-md);
    border-right: 5px solid var(--ksu-blue);
    text-align: center;
    position: relative;
}

.language-toggle {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: var(--ksu-blue);
    color: var(--white);
    border: none;
    border-radius: 50px;
    padding: 0.6rem 1.2rem;
    font-weight: 600;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 132, 189, 0.2);
    z-index: 10;
}

.language-toggle:hover {
    background: #006a9a;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 132, 189, 0.3);
}

.language-toggle i {
    font-size: 1.1rem;
}

.lang-text {
    font-family: 'Tajawal', sans-serif;
    letter-spacing: 0.5px;
}

[dir="ltr"] .header-section {
    border-right: none;
    border-left: 5px solid var(--ksu-blue);
}

[dir="ltr"] .language-toggle {
    right: auto;
    left: 1.5rem;
}

@media (max-width: 768px) {
    .language-toggle {
        top: 1rem;
        right: 1rem;
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }
    
    [dir="ltr"] .language-toggle {
        left: 1rem;
    }
}

.coeia-logo {
    max-width: 400px;
    width: 100%;
    height: auto;
    margin-bottom: 1.5rem;
}

.icon-circle {
    width: 100px;
    height: 100px;
    background: var(--ksu-blue);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    box-shadow: 0 8px 20px rgba(0, 132, 189, 0.3);
}

.icon-circle i {
    font-size: 3rem;
    color: var(--white);
}

.main-title {
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--ksu-blue);
    margin-bottom: 0.5rem;
}

.subtitle {
    font-size: 1.1rem;
    color: var(--ksu-grey);
    font-weight: 400;
}

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

.form-card {
    background: var(--white);
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: var(--shadow-md);
}

.form-header {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 3px solid var(--ksu-blue);
}

.form-header h2 {
    color: var(--ksu-blue);
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.form-header p {
    color: var(--ksu-grey);
    font-size: 1rem;
    margin: 0;
}

.form-label {
    color: var(--ksu-blue);
    font-weight: 600;
    font-size: 1.05rem;
    margin-bottom: 0.75rem;
}

.form-control {
    border: 2px solid var(--ksu-grey);
    border-radius: 12px;
    padding: 0.875rem 1.25rem;
    font-size: 1.05rem;
    transition: all 0.3s ease;
    background: var(--ksu-cream);
}

.form-control:focus {
    border-color: var(--ksu-blue);
    background: var(--white);
    box-shadow: 0 0 0 0.2rem rgba(0, 132, 189, 0.15);
    outline: none;
}

.form-control-lg {
    padding: 1rem 1.5rem;
    font-size: 1.15rem;
}

.form-text {
    color: var(--ksu-grey);
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

.form-text a {
    color: var(--ksu-blue);
    text-decoration: none;
    font-weight: 600;
}

.form-text a:hover {
    text-decoration: underline;
}

.btn-primary {
    background: var(--ksu-blue);
    border: none;
    border-radius: 12px;
    padding: 1rem 2rem;
    font-size: 1.15rem;
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(0, 132, 189, 0.3);
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 132, 189, 0.4);
    background: #006a9a;
}

.btn-outline-secondary {
    border: 2px solid var(--ksu-grey);
    color: var(--ksu-grey);
    border-radius: 12px;
    padding: 0.875rem 2rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-outline-secondary:hover {
    background: var(--ksu-grey);
    border-color: var(--ksu-grey);
    color: var(--white);
}

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

.loading-card {
    background: rgba(0, 132, 189, 0.08);
    border: 2px solid var(--ksu-blue);
    border-radius: 16px;
    padding: 3rem 2rem;
    text-align: center;
}

.loading-card h3 {
    color: var(--ksu-blue);
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.loading-card p {
    color: var(--ksu-grey);
    margin: 0;
}

.spinner-border {
    width: 3rem;
    height: 3rem;
}

#errorSection .alert {
    border-radius: 16px;
    border: none;
    box-shadow: var(--shadow-sm);
    font-size: 1.05rem;
}

.results-section {
    margin-bottom: 3rem;
}

.results-header {
    background: var(--ksu-blue);
    color: var(--white);
    border-radius: 20px;
    padding: 2.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 6px 25px rgba(0, 132, 189, 0.3);
}

.results-header-content {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.status-icon {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    backdrop-filter: blur(10px);
}

.status-icon i {
    font-size: 2.5rem;
}

.status-icon.danger {
    background: rgba(232, 74, 65, 0.3);
}

.status-info {
    flex: 1;
}

.results-header h2 {
    font-size: 2rem;
    font-weight: 900;
    margin-bottom: 0.5rem;
}

.email-display {
    font-size: 1.2rem;
    opacity: 0.95;
    margin-bottom: 1rem;
    word-break: break-word;
}

.results-meta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.meta-badge {
    background: rgba(255, 255, 255, 0.25);
    padding: 0.5rem 1.25rem;
    border-radius: 25px;
    font-size: 0.95rem;
    backdrop-filter: blur(10px);
    display: inline-flex;
    align-items: center;
}

.breaches-container {
    display: grid;
    gap: 1.5rem;
}

.breach-card {
    background: var(--white);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: var(--shadow-md);
    border-right: 5px solid var(--danger);
    transition: all 0.3s ease;
}

.breach-card:hover {
    transform: translateX(-5px);
    box-shadow: var(--shadow-lg);
}

.breach-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 1.5rem;
    gap: 1rem;
}

.breach-title {
    flex: 1;
}

.breach-title h3 {
    color: var(--ksu-blue);
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.breach-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--danger) 0%, #ff6b6b 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 1.5rem;
    flex-shrink: 0;
}

.breach-date {
    background: var(--ksu-blue);
    color: var(--white);
    padding: 0.5rem 1.25rem;
    border-radius: 25px;
    font-weight: 700;
    font-size: 0.95rem;
    white-space: nowrap;
}

.breach-description {
    color: var(--ksu-grey);
    line-height: 1.8;
    margin-bottom: 1.5rem;
    font-size: 1.05rem;
}

.breach-details {
    background: #f8f9fb;
    border-radius: 12px;
    padding: 1.5rem;
}

.breach-details h4 {
    color: var(--ksu-blue);
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.data-types {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.data-type-badge {
    background: var(--ksu-blue);
    color: var(--white);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.breach-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.stat-item {
    background: var(--white);
    padding: 1rem;
    border-radius: 10px;
    border-right: 3px solid var(--ksu-blue);
}

.stat-label {
    color: var(--ksu-grey);
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.stat-value {
    color: var(--ksu-blue);
    font-size: 1.1rem;
    font-weight: 700;
}

.no-breaches-card {
    background: var(--white);
    border-radius: 20px;
    padding: 3rem 2rem;
    text-align: center;
    box-shadow: var(--shadow-md);
    border: 3px solid var(--ksu-blue);
}

.success-icon {
    width: 100px;
    height: 100px;
    background: var(--ksu-blue);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    box-shadow: 0 6px 20px rgba(0, 132, 189, 0.3);
}

.success-icon i {
    font-size: 3rem;
    color: var(--white);
}

.no-breaches-card h3 {
    color: var(--ksu-blue);
    font-size: 2rem;
    font-weight: 900;
    margin-bottom: 1rem;
}

.no-breaches-card > p {
    color: var(--ksu-grey);
    font-size: 1.15rem;
    margin-bottom: 2rem;
}

.security-tips {
    background: #f8f9fb;
    border-radius: 16px;
    padding: 2rem;
    text-align: right;
    max-width: 600px;
    margin: 0 auto;
}

.security-tips h4 {
    color: var(--ksu-blue);
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.security-tips ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.security-tips li {
    color: var(--ksu-grey);
    padding: 0.75rem 0;
    border-bottom: 1px solid #e0e0e0;
    font-size: 1.05rem;
    position: relative;
    padding-right: 2rem;
}

.security-tips li:last-child {
    border-bottom: none;
}

.security-tips li::before {
    content: "✓";
    position: absolute;
    right: 0;
    color: var(--ksu-blue);
    font-weight: 900;
    font-size: 1.2rem;
}

.footer {
    background: var(--white);
    border-top: 3px solid var(--ksu-blue);
    padding: 2rem 0;
    margin-top: 3rem;
    text-align: center;
}

.footer p {
    color: var(--ksu-grey);
    margin: 0;
    font-size: 1rem;
}

@media (max-width: 768px) {
    body {
        padding: 1rem 0;
    }

    .coeia-logo {
        max-width: 250px;
    }

    .main-title {
        font-size: 2rem;
    }

    .subtitle {
        font-size: 1rem;
    }

    .icon-circle {
        width: 80px;
        height: 80px;
    }

    .icon-circle i {
        font-size: 2.5rem;
    }

    .header-section {
        padding: 2rem 1.5rem;
    }

    .form-card {
        padding: 1.5rem;
    }

    .form-header h2 {
        font-size: 1.5rem;
    }

    .results-header {
        padding: 2rem 1.5rem;
    }

    .results-header-content {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
    }

    .status-icon {
        width: 70px;
        height: 70px;
    }

    .status-icon i {
        font-size: 2rem;
    }

    .results-header h2 {
        font-size: 1.6rem;
    }

    .email-display {
        font-size: 1.05rem;
    }

    .breach-card {
        padding: 1.5rem;
    }

    .breach-header {
        flex-direction: column;
        align-items: start;
    }

    .breach-title h3 {
        font-size: 1.4rem;
    }

    .breach-stats {
        grid-template-columns: 1fr;
    }

    .security-tips {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .main-title {
        font-size: 1.75rem;
    }

    .breach-title h3 {
        font-size: 1.25rem;
    }

    .data-types {
        gap: 0.5rem;
    }

    .data-type-badge {
        font-size: 0.85rem;
        padding: 0.4rem 0.8rem;
    }
}
