/* ===== Base Styles ===== */
:root {
    --primary: #6c5ce7;
    --primary-dark: #5649c0;
    --primary-light: #a29bfe;
    --secondary: #fd79a8;
    --dark: #2d3436;
    --dark-light: #636e72;
    --light: #f5f6fa;
    --light-dark: #dfe6e9;
    --success: #00b894;
    --warning: #fdcb6e;
    --danger: #d63031;
    --info: #0984e3;
    
    --gradient: linear-gradient(135deg, var(--primary), var(--secondary));
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Poppins', sans-serif;
    color: var(--dark);
    background-color: var(--light);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

h1, h2, h3, h4 {
    font-weight: 700;
    line-height: 1.2;
}

a {
    text-decoration: none;
    color: inherit;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    font-size: 1rem;
    gap: 0.5rem;
}

.btn-primary {
    background: var(--gradient);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    text-align: center;
}

.section-subtitle {
    font-size: 1.2rem;
    color: var(--dark-light);
    text-align: center;
    margin-bottom: 3rem;
}

/* ===== Background Animation ===== */
.background-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    z-index: -2;
}

/* ===== Navbar ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: var(--shadow);
    z-index: 1000;
    transition: var(--transition);
}

.navbar.scrolled {
    background-color: rgba(255, 255, 255, 0.98);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

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

.navbar-brand {
    display: flex;
    align-items: center;
}

.navbar-brand a {
    display: flex;
    align-items: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dark);
}

.navbar-brand i {
    font-size: 1.8rem;
    color: var(--primary);
    margin-right: 0.5rem;
}

.logo-highlight {
    color: var(--primary);
}

.navbar-menu {
    
    display: flex;
    align-items: center;
}

.navbar-links {
    display: flex;
    margin-right: 2rem;
}

.navbar-links a {
    padding: 0.5rem 1rem;
    margin: 0 0.5rem;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

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

.navbar-links a.active {
    color: var(--primary);
    font-weight: 600;
}

.navbar-links a.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 1rem;
    width: calc(100% - 2rem);
    height: 3px;
    background: var(--gradient);
    border-radius: 3px;
}

.navbar-actions {
    display: flex;
    gap: 1rem;
}

.navbar-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--dark);
    cursor: pointer;
}

/* ===== Hero Section ===== */
.hero {
    padding: 150px 0 100px;
    position: relative;
    overflow: hidden;
}

.hero .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.hero-content {
    flex: 1;
    max-width: 600px;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.3rem;
    color: var(--dark-light);
    margin-bottom: 2rem;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 3rem;
}

.hero-stats {
    display: flex;
    gap: 2rem;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--dark-light);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.hero-image {
    flex: 1;
    display: flex;
    justify-content: center;
}

.diary-mockup {
    width: 400px;
    background: white;
    border-radius: 10px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    transform: perspective(1000px) rotateY(-10deg);
    transition: var(--transition);
}

.diary-mockup:hover {
    transform: perspective(1000px) rotateY(-5deg);
}

.mockup-header {
    padding: 1rem;
    background: var(--light-dark);
    display: flex;
    justify-content: flex-end;
}

.mockup-dots {
    display: flex;
    gap: 0.5rem;
}

.mockup-dots span {
    display: block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--dark-light);
}

.mockup-content {
    padding: 2rem;
    min-height: 300px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.encrypted-text {
    font-family: 'Roboto Mono', monospace;
    color: var(--dark-light);
    word-break: break-all;
    margin-bottom: 2rem;
}

.mockup-footer {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary);
    font-size: 0.9rem;
}

/* ===== Features Section ===== */
.features {
    padding: 6rem 0;
    background-color: white;
}

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

.feature-card {
    background: var(--light);
    border-radius: 10px;
    padding: 2rem;
    transition: var(--transition);
    box-shadow: var(--shadow);
    text-align: center;
}

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

.feature-icon {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 1.5rem;
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.feature-card p {
    color: var(--dark-light);
}

/* ===== How It Works Section ===== */
.how-it-works {
    padding: 6rem 0;
    background: linear-gradient(to bottom, white 0%, var(--light) 100%);
}

.steps {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    max-width: 800px;
    margin: 0 auto 4rem;
}

.step {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
}

.step-number {
    width: 50px;
    height: 50px;
    background: var(--gradient);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    flex-shrink: 0;
}

.step-content {
    padding-top: 0.5rem;
}

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

.encryption-visual {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 600px;
    margin: 0 auto;
}

.plaintext, .ciphertext {
    font-family: 'Roboto Mono', monospace;
    padding: 1rem;
    background: var(--light);
    border-radius: 5px;
    width: 100%;
    text-align: center;
    margin: 1rem 0;
}

.encryption-process {
    display: flex;
    align-items: center;
    width: 100%;
    justify-content: space-between;
    padding: 1rem 0;
}

.encryption-process i {
    font-size: 2rem;
    color: var(--primary);
}

.process-line {
    flex: 1;
    height: 2px;
    background: var(--primary-light);
    margin: 0 1rem;
}

/* ===== Testimonials Section ===== */
.testimonials {
    padding: 6rem 0;
    background-color: white;
}

.testimonial-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.testimonial-card {
    background: var(--light);
    border-radius: 10px;
    padding: 2rem;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

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

.testimonial-content {
    position: relative;
    margin-bottom: 2rem;
}

.testimonial-content i {
    position: absolute;
    top: -10px;
    left: -10px;
    font-size: 2rem;
    color: var(--primary-light);
    opacity: 0.5;
}

.testimonial-content p {
    font-style: italic;
    color: var(--dark);
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.author-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    overflow: hidden;
}

.author-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.author-info h4 {
    font-size: 1.1rem;
    margin-bottom: 0.2rem;
}

.author-title {
    font-size: 0.9rem;
    color: var(--dark-light);
}

/* ===== CTA Section ===== */
.cta {
    padding: 6rem 0;
    background: var(--gradient);
    color: white;
}

.cta-card {
    background: white;
    border-radius: 10px;
    padding: 3rem;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    box-shadow: var(--shadow-lg);
}

.cta-card h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--dark);
}

.cta-card p {
    font-size: 1.2rem;
    color: var(--dark-light);
    margin-bottom: 2rem;
}

.cta-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* ===== Footer ===== */
.footer {
    background-color: var(--dark);
    color: white;
    padding: 4rem 0 0;
}

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

.footer-about {
    max-width: 300px;
}

.footer-logo {
    display: flex;
    align-items: center;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.footer-logo i {
    font-size: 1.8rem;
    color: var(--primary);
    margin-right: 0.5rem;
}

.footer p {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 1.5rem;
}

.footer-social {
    display: flex;
    gap: 1rem;
}

.footer-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    transition: var(--transition);
}

.footer-social a:hover {
    background: var(--primary);
    transform: translateY(-3px);
}

.footer-links h3 {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    color: white;
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.8rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    transition: var(--transition);
}

.footer-links a:hover {
    color: white;
    padding-left: 5px;
}

.footer-newsletter h3 {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    color: white;
}

.footer-newsletter p {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 1rem;
}

.newsletter-form {
    display: flex;
}

.newsletter-form input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: none;
    border-radius: 50px 0 0 50px;
    font-size: 1rem;
}

.newsletter-form button {
    border-radius: 0 50px 50px 0;
    padding: 0 1.5rem;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 2rem 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-copyright {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
}

.footer-legal {
    display: flex;
    gap: 1.5rem;
}

.footer-legal a {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
    transition: var(--transition);
}

.footer-legal a:hover {
    color: white;
}

/* ===== Responsive Styles ===== */
@media (max-width: 992px) {
    .hero .container {
        flex-direction: column;
        text-align: center;
    }
    
    .hero-content {
        max-width: 100%;
        margin-bottom: 3rem;
    }
    
    .hero-actions, .hero-stats {
        justify-content: center;
    }
    
    .diary-mockup {
        transform: none;
    }
}

@media (max-width: 768px) {
    .navbar-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: white;
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        padding: 2rem;
        transition: var(--transition);
        box-shadow: var(--shadow-lg);
    }
    
    .navbar-menu.active {
        left: 0;
    }
    
    .navbar-links {
        flex-direction: column;
        margin-right: 0;
        margin-bottom: 2rem;
        width: 100%;
    }
    
    .navbar-links a {
        padding: 1rem;
        text-align: center;
        width: 100%;
    }
    
    .navbar-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .navbar-toggle {
        display: block;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .cta-actions {
        flex-direction: column;
    }
}

@media (max-width: 576px) {
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero-actions {
        flex-direction: column;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: 1rem;
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .footer-legal {
        flex-direction: column;
        gap: 0.5rem;
    }
}

/* ===== Cipher Page Styles ===== */
.cipher-container {
    padding: 4rem 0;
    
}

.cipher-header {
    padding-top: 3rem;
    text-align: center;
    margin-bottom: 3rem;
   
}

.cipher-header h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.cipher-header p {
    color: var(--dark-light);
    font-size: 1.1rem;
}

.cipher-card {
    background: white;
    border-radius: 10px;
    padding: 2rem;
    box-shadow: var(--shadow);
    margin-bottom: 3rem;
}

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

.form-row {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.form-row .form-group {
    flex: 1;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--dark);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--light-dark);
    border-radius: 5px;
    font-family: 'Poppins', sans-serif;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.2);
}

.form-group textarea {
    min-height: 150px;
    resize: vertical;
}

.form-hint {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.8rem;
    color: var(--dark-light);
}

.result-container {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--light-dark);
}

.result-container h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    color: var(--primary);
}

.result-box {
    background: var(--light);
    border-radius: 5px;
    padding: 1.5rem;
    font-family: 'Roboto Mono', monospace;
    white-space: pre-wrap;
    word-break: break-word;
}

.saved-notes-section {
    margin-top: 3rem;
}

.saved-notes-section h2 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

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

.note-card {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

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

.note-card h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--dark);
}

.note-actions {
    margin-top: 1rem;
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

.empty-state {
    text-align: center;
    padding: 2rem;
    background: var(--light);
    border-radius: 10px;
    color: var(--dark-light);
}

.empty-state i {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--primary-light);
}

.empty-state p {
    font-size: 1.1rem;
}

@media (max-width: 768px) {
    .form-row {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .cipher-header h1 {
        font-size: 2rem;
    }
}

/* ===== Auth Page Styles ===== */
.auth-background {
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.auth-container {
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
    padding: 2rem;
}

.auth-card {
    background: white;
    border-radius: 15px;
    padding: 2.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    animation: fadeIn 0.5s ease;
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-icon {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.auth-header h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: var(--dark);
}

.auth-header p {
    color: var(--dark-light);
}

.auth-alerts {
    margin-bottom: 1.5rem;
}

.alert {
    padding: 0.75rem 1rem;
    border-radius: 5px;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9rem;
}

.alert-error {
    background: rgba(214, 48, 49, 0.1);
    color: var(--danger);
    border-left: 3px solid var(--danger);
}

.alert-success {
    background: rgba(0, 184, 148, 0.1);
    color: var(--success);
    border-left: 3px solid var(--success);
}

.input-with-icon {
    position: relative;
}

.input-with-icon i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--dark-light);
}

.input-with-icon input {
    padding-left: 2.5rem !important;
}

.auth-form .form-group {
    margin-bottom: 1.5rem;
}

.auth-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--dark);
}

.auth-form input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--light-dark);
    border-radius: 5px;
    font-family: 'Poppins', sans-serif;
    transition: var(--transition);
}

.auth-form input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.2);
}

.btn-block {
    width: 100%;
    display: block;
}

.auth-footer {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.9rem;
}

.auth-footer a {
    color: var(--primary);
    font-weight: 500;
    transition: var(--transition);
}

.auth-footer a:hover {
    color: var(--primary-dark);
}

.forgot-password {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.85rem;
}

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

@media (max-width: 576px) {
    .auth-container {
        padding: 1rem;
    }
    
    .auth-card {
        padding: 1.5rem;
    }
    
    .auth-header h1 {
        font-size: 1.5rem;
    }
}

/* ===== View Note Page Styles ===== */
.view-note-container {
    padding: 3rem 0;
}

.view-note-header {
    margin-bottom: 2rem;
}

.view-note-header h1 {
    font-size: 2rem;
    margin: 1rem 0 0.5rem;
    color: var(--dark);
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary);
    font-weight: 500;
    margin-bottom: 1rem;
}

.note-meta {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--dark-light);
    font-size: 0.9rem;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.view-note-content {
    background: white;
    border-radius: 10px;
    padding: 2rem;
    box-shadow: var(--shadow);
}

.encrypted-section,
.decrypt-form-section,
.decrypted-section {
    margin-bottom: 2.5rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--light-dark);
}

.encrypted-section h2,
.decrypt-form-section h2,
.decrypted-section h2 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--dark);
}

.encrypted-message,
.decrypted-message {
    background: var(--light);
    border-radius: 5px;
    padding: 1.5rem;
    font-family: 'Roboto Mono', monospace;
    white-space: pre-wrap;
    word-break: break-word;
    margin-bottom: 1.5rem;
}

.decrypt-form .form-row {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.decrypt-form .form-group {
    flex: 1;
}

.copy-section {
    margin-top: 1.5rem;
}

.copy-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

@media (max-width: 768px) {
    .decrypt-form .form-row {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .view-note-header h1 {
        font-size: 1.75rem;
    }
}