:root {
    --primary-blue: #013d7a;
    --secondary-blue: #0066cc;
    --accent-pink: #ff3366;
    --light-bg: #f0f7ff;
    --card-bg: #ffffff;
    --text-dark: #333;
    --text-light: #666;
    --border-color: #e1e8f0;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    --footer-bg: #0a192f;
    --footer-text: #ccd6f6;
    --footer-heading: #e6f1ff;
    --footer-border: #233554;
    --footer-hover: #64ffda;
    --radius: 10px;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: linear-gradient(135deg, #f0f7ff 0%, #e4edf5 100%);
    color: #2b2d42;
    line-height: 1.6;
    min-height: 100vh;
}

/* Header Styles */
.header {
    background: white;
    position: sticky;
    top: 0;
    width: 100%;
    height: 60px;
    display: flex;
    align-items: center;
    padding: 0 20px;
    box-shadow: var(--shadow);
    z-index: 1000;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo a {
    text-decoration: none;
    color: var(--footer-bg);
    font-size: 28px;
    font-weight: 700;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
}

.logo a:hover {
    color: var(--accent-pink);
}

/* Navigation */
.nav-links {
    display: flex;
    margin-left: 30px;
}

.nav-item {
    position: relative;
    color: black;
    font-weight: 500;
    font-size: 0.9rem;
    cursor: pointer;
    padding: 10px 16px;
    transition: color 0.3s;
    display: flex;
    align-items: center;
    gap: 5px;
}

.links a {
    color: black;
    text-decoration: none;
    transition: all 0.3s ease;
}

.links a:hover {
    color: var(--accent-pink);
}

.nav-item:hover {
    color: var(--accent-pink);
}

.dropdown-icon {
    font-size: 12px;
    transition: transform 0.3s ease;
}

.nav-item:hover .dropdown-icon {
    transform: rotate(180deg);
}

/* Mega Dropdown Styles */
.mega-dropdown {
    position: absolute;
    top: 45px;
    left: -750px;
    background-color: white;
    width: 1200px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    padding: 30px;
    display: none;
    z-index: 1001;
    grid-template-columns: repeat(6, 1fr);
    border-top: 3px solid var(--accent-pink);
}

.nav-item:hover .mega-dropdown {
    display: grid;
    animation: fadeIn 0.3s ease;
}

.dropdown-section h3 {
    color: var(--primary-blue);
    font-size: 0.9rem;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
}

.dropdown-section h3 i {
    margin-right: 10px;
    color: var(--accent-pink);
    background: rgba(255, 51, 102, 0.1);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dropdown-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.dropdown-link {
    display: flex;
    align-items: center;
    color: var(--text-dark);
    text-decoration: none;
    font-size: 0.7rem;
    padding: 5px;
    border-radius: 4px;
    transition: all 0.2s;
}

.dropdown-link:hover {
    background-color: #f0f7ff;
    color: var(--accent-pink);
}

.dropdown-link i {
    margin-right: 12px;
    color: var(--secondary-blue);
    width: 20px;
    text-align: center;
    font-size: 14px;
}

/* Mobile Toggle */
.mobile-toggle {
    margin-left: auto;
    display: none;
    background: none;
    border: none;
    color: var(--accent-pink);
    font-size: 24px;
    cursor: pointer;
}

/* Mobile Sidebar */
.mobile-sidebar {
    position: fixed;
    top: 70px;
    left: -100%;
    width: 100%;
    height: calc(100vh - 70px);
    background-color: white;
    z-index: 999;
    transition: all 0.4s ease;
    overflow-y: auto;
    padding: 20px;
    box-shadow: var(--shadow);
}

.mobile-sidebar.active {
    left: 0;
}

.mobile-category {
    margin-top: 20px;
}

.mobile-category-title {
    font-size: 18px;
    color: var(--primary-blue);
    font-weight: 500;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--accent-pink);
    display: flex;
    align-items: center;
    gap: 10px;
}

.mobile-category-title i {
    color: var(--accent-pink);
}

.mobile-tool-link {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    text-decoration: none;
    border-radius: 6px;
    margin-bottom: 8px;
    font-weight: 500;
    transition: all 0.2s;
    background: #f8fafd;
    color: var(--text-dark);
}

.mobile-tool-link:hover {
    background: linear-gradient(135deg, #f5f7fa 0%, #e4edf5 100%);
    transform: translateX(5px);
    color: var(--accent-pink);
}

.mobile-tool-link i {
    margin-right: 15px;
    color: var(--secondary-blue);
    font-size: 18px;
    width: 24px;
    text-align: center;
}

/* Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Signature Tool Styles */
.main-container {
    max-width: 1200px;
    margin: 40px auto 200px;
    padding: 0 20px;
}

.tool-header {
    text-align: center;
    margin: 30px 0 40px;
    padding: 0 20px;
}

.tool-title {
    color: var(--footer-bg);
    font-size: 2.8rem;
    margin-bottom: 15px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.tool-subtitle {
    color: var(--text-light);
    font-size: 1.2rem;
    max-width: 900px;
    margin: 0 auto;
    line-height: 1.8;
}

/* Tool Container */
.tool-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 40px;
}

@media (max-width: 900px) {
    .tool-container {
        grid-template-columns: 1fr;
    }
}

.signature-section {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.section-header {
    background: var(--primary-blue);
    color: white;
    padding: 18px 25px;
    font-size: 1.2rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    
}

.section-content {
    padding: 25px;
}

/* Canvas Section */
.canvas-wrapper {
    position: relative;
    margin: 0 auto;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#signatureCanvas {
    display: block;
    width: 100%;
    height: 100%;
    background: white;
    cursor: crosshair;
}

.canvas-placeholder {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #cbd5e1;
    font-size: 1.1rem;
    pointer-events: none;
    text-align: center;
    padding: 20px;
    max-width: 80%;
}

.canvas-placeholder i {
    font-size: 3rem;
    display: block;
    margin-bottom: 15px;
    color: #e2e8f0;
}

/* Controls */
.tool-controls {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
    margin-top: 25px;
}

.control-group {
    display: flex;
    flex-direction: column;
}

.control-group label {
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-dark);
    font-size: 0.95rem;
}

.pen-size {
    display: flex;
    align-items: center;
    gap: 10px;
}

.pen-size input {
    width: 100%;
}

.pen-size-value {
    min-width: 40px;
    text-align: center;
    background: var(--light-bg);
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 0.9rem;
}

.color-picker {
    display: flex;
    align-items: center;
    gap: 10px;
}

.color-picker input {
    width: 40px;
    height: 40px;
    border: none;
    background: none;
    cursor: pointer;
    border-radius: 8px;
    overflow: hidden;
}

.color-value {
    background: var(--light-bg);
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.9rem;
    min-width: 100px;
}

/* Action Buttons */
.action-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 15px;
    margin-top: 30px;
}

.btn {
    padding: 14px 20px;
    border-radius: 8px;
    border: none;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-primary {
    background: var(--primary-blue);
    color: white;
    box-shadow: 0 4px 6px rgba(1, 61, 122, 0.3);
}

.btn-primary:hover {
    background: #002c5a;
    transform: translateY(-2px);
    box-shadow: 0 6px 8px rgba(1, 61, 122, 0.4);
}

.btn-secondary {
    background: white;
    color: var(--text-dark);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--light-bg);
    transform: translateY(-2px);
}

.btn-success {
    background: #10b981;
    color: white;
    box-shadow: 0 4px 6px rgba(16, 185, 129, 0.3);
}

.btn-success:hover {
    background: #059669;
    transform: translateY(-2px);
    box-shadow: 0 6px 8px rgba(16, 185, 129, 0.4);
}

.btn-warning {
    background: #f59e0b;
    color: white;
    box-shadow: 0 4px 6px rgba(245, 158, 11, 0.3);
}

.btn-warning:hover {
    background: #d97706;
    transform: translateY(-2px);
    box-shadow: 0 6px 8px rgba(245, 158, 11, 0.4);
}

.btn-danger {
    background: var(--accent-pink);
    color: white;
    box-shadow: 0 4px 6px rgba(255, 51, 102, 0.3);
}

.btn-danger:hover {
    background: #e62e5c;
    transform: translateY(-2px);
    box-shadow: 0 6px 8px rgba(255, 51, 102, 0.4);
}

/* Signature Styles */
.signature-styles {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.style-option {
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    background: white;
}

.style-option:hover {
    border-color: var(--primary-blue);
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.style-option.active {
    border-color: var(--primary-blue);
    background: rgba(1, 61, 122, 0.05);
    box-shadow: 0 4px 8px rgba(1, 61, 122, 0.15);
}

.style-preview {
    font-family: 'Dancing Script', cursive;
    font-size: 1.8rem;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    color: var(--primary-blue);
}

.style-name {
    font-size: 0.9rem;
    color: var(--text-dark);
    font-weight: 500;
}

/* Text Signature */
.text-signature-controls {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.text-input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.text-input-group label {
    font-weight: 500;
    color: var(--text-dark);
}

.text-input-group input {
    padding: 14px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: var(--transition);
}

.text-input-group input:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(1, 61, 122, 0.2);
}

.font-select {
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    background: white;
    cursor: pointer;
}

.font-select:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(1, 61, 122, 0.2);
}

.text-preview {
    margin-top: 20px;
    text-align: center;
    padding: 30px;
    border: 1px dashed var(--border-color);
    border-radius: 8px;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.text-signature {
    font-size: 2.5rem;
    font-family: 'Dancing Script', cursive;
    color: var(--text-dark);
}

/* Features Section */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
}

.feature-card {
    display: flex;
    gap: 15px;
}

.feature-icon {
    background: rgba(1, 61, 122, 0.1);
    width: 50px;
    height: 50px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.feature-icon i {
    color: var(--primary-blue);
    font-size: 1.5rem;
}

.feature-content h3 {
    color: var(--text-dark);
    margin-bottom: 8px;
}

.feature-content p {
    color: var(--text-light);
    line-height: 1.6;
}

/* Footer */
.copyright {
    background: var(--footer-bg);
    color: var(--footer-text);
    text-align: center;
    padding: 20px;
    font-size: 0.9rem;
    margin-top: 40px;
}

.copyright a {
    color: var(--footer-hover);
    text-decoration: none;
    transition: var(--transition);
}

.copyright a:hover {
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 768px) {
    .header {
        padding: 0 15px;
        height: 70px;
    }

    .tool-title {
        font-size: 2.2rem;
    }

    .tool-subtitle {
        font-size: 1rem;
    }

    .section-content {
        padding: 20px;
    }

    .action-buttons {
        grid-template-columns: 1fr;
    }

    .nav-links {
        display: none;
    }

    .mobile-toggle {
        display: block;
    }
}

/* Utility classes */
.hidden {
    display: none !important;
}