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

/* Body Styles */
body {
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
    background-color: #121212; /* Dark background */
    color: #ffffff; /* White text */
    font-size: 16px;
}

html {
    scroll-behavior: smooth;
}

/* Header Styles */
header {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 50%, #7e8ba3 100%);
    background-size: cover;
    background-position: center;
    color: #ffffff;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

header h1 {
    font-size: 24px;
    font-weight: 700;
    font-family: 'Montserrat', sans-serif;
    margin-right: auto;
    color: rgba(255, 255, 255, 0.8);
    text-shadow: 0 0 10px #CCCCCC, 0 0 15px #CCCCCC, 0 0 25px #CCCCCC; /* Glowing effect */
}

nav ul {
    list-style-type: none;
    margin: 0;
    padding: 0;
    display: flex;
}

nav ul li {
    margin-left: 20px;
}

nav ul li:first-child {
    margin-left: 0;
}

nav ul li a {
    color: #ffffff;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
}

nav ul li a:hover {
    color: #64b5f6; /* Light blue on hover */
}

/* Section Styles */
section {
    padding: 40px 20px;
}

section#feature {
    text-align: center;
    padding: 80px 20px;
    background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
    border-bottom: 2px solid #2196F3;
}

section#feature h2 {
    font-size: 36px;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #64b5f6 0%, #2196F3 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

section#feature p {
    max-width: 700px;
    margin: 0 auto 30px;
    font-size: 18px;
    color: #b0b0b0;
    line-height: 1.8;
}

h2 {
    font-size: 32px;
    margin-bottom: 20px;
    color: #ffffff;
    font-weight: 700;
    font-family: 'Roboto Slab', serif;
}

p {
    margin-bottom: 20px;
    font-size: 16px;
    line-height: 1.6;
    color: #ffffff; /* White text */
}

/* CTA Button Styles */
.cta,
button[type="submit"],
.download-btn,
.share-btn {
    display: inline-block;
    padding: 12px 28px;
    background: linear-gradient(135deg, #2196F3 0%, #1976D2 100%);
    color: #ffffff;
    text-decoration: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    font-family: 'Montserrat', sans-serif;
    border: none;
    box-shadow: 0 2px 8px rgba(33, 150, 243, 0.3);
}

.cta:hover,
button[type="submit"]:hover,
.download-btn:hover,
.share-btn:hover {
    background: linear-gradient(135deg, #1976D2 0%, #1565C0 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.4);
    color: #ffffff;
}

/* Form Styles */
form {
    max-width: 900px;
    margin: 0 auto;
    background: linear-gradient(145deg, #1a1a1a, #252525);
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5), 0 0 1px rgba(33, 150, 243, 0.3);
    border: 1px solid #2a2a2a;
}

.form-group {
    margin-bottom: 20px;
    position: relative; /* Ensure suggestions dropdown is positioned relative to form-group */
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #e0e0e0;
    font-size: 14px;
    letter-spacing: 0.3px;
}

input[type="text"],
input[type="email"],
input[type="tel"],
textarea,
select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #424242;
    border-radius: 6px;
    font-size: 16px;
    margin-top: 5px;
    background-color: #1e1e1e;
    color: #ffffff;
    transition: all 0.3s ease;
    font-family: 'Roboto', sans-serif;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: #2196F3;
    background-color: #252525;
    box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.1);
}

input[type="text"]::placeholder,
input[type="email"]::placeholder,
input[type="tel"]::placeholder,
textarea::placeholder {
    color: #888888;
    opacity: 1;
}

textarea {
    min-height: 100px;
    resize: vertical;
    font-family: 'Roboto', sans-serif;
    line-height: 1.5;
}

select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url('data:image/svg+xml;utf8,<svg fill="%232196F3" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/><path d="M0 0h24v24H0z" fill="none"/></svg>');
    background-position: right 12px center;
    background-repeat: no-repeat;
    padding-right: 40px;
    cursor: pointer;
}
/* Section Styles */
section#resume-editor {
    padding: 40px 20px;
}

/* Heading Styles */
h2 {
    font-size: 32px;
    margin-bottom: 20px;
    font-weight: 700;
    font-family: 'Roboto Slab', serif;
}

h3 {
    font-size: 22px;
    margin-top: 40px;
    margin-bottom: 20px;
    color: #64b5f6;
    font-weight: 600;
    padding-bottom: 10px;
    border-bottom: 2px solid #2196F3;
    font-family: 'Roboto Slab', serif;
}

/* Paragraph Styles */
section#resume-editor p {
    margin-bottom: 20px;
    font-size: 16px;
    line-height: 1.6;
}

/* Real-time preview styles */
#real-time-preview {
    border: 2px solid #4caf4f94;
    padding: 20px;
    min-height: 400px;
    background: #ffffff;
    border-radius: 10px;
    margin-bottom: 20px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
    overflow: auto;
}

/* Common template styles */
.resume-template {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #333;
}

/* Template 1 - Classic Professional */
.template1-design {
    background: #ffffff;
    padding: 30px;
}

.template1-design .resume-header {
    text-align: center;
    border-bottom: 3px solid #57078f;
    padding-bottom: 20px;
    margin-bottom: 30px;
}

.template1-design .resume-name {
    font-size: 32px;
    color: #57078f;
    margin-bottom: 10px;
    font-weight: bold;
}

.template1-design .contact-info {
    font-size: 13px;
    color: #666;
    margin: 5px 0;
}

.template1-design .contact-info span {
    margin: 0 12px;
    white-space: nowrap;
}

.template1-design .contact-links {
    margin-top: 8px;
    font-size: 12px;
}

.template1-design .summary-text {
    color: #333;
    line-height: 1.7;
    text-align: justify;
    font-size: 15px;
}

.template1-design .section-title {
    font-size: 20px;
    color: #57078f;
    border-bottom: 2px solid #57078f;
    padding-bottom: 5px;
    margin-bottom: 15px;
    margin-top: 25px;
    font-weight: bold;
}

.template1-design .section-item {
    margin-bottom: 20px;
}

.template1-design .item-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 5px;
}

.template1-design .item-header h3 {
    font-size: 18px;
    color: #333;
    font-weight: bold;
    margin: 0;
}

.template1-design .item-date {
    font-size: 14px;
    color: #666;
    font-style: italic;
}

.template1-design .item-subtitle {
    font-size: 16px;
    color: #555;
    margin: 5px 0;
}

.template1-design .item-detail,
.template1-design .item-description {
    font-size: 14px;
    color: #666;
    margin: 5px 0;
    line-height: 1.5;
}

.template1-design .skills-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.template1-design .skill-tag {
    background: #57078f;
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 14px;
}

/* Template 2 - Modern Minimal with Sidebar */
.template2-design {
    display: grid;
    grid-template-columns: 250px 1fr;
    background: #ffffff;
    min-height: 500px;
}

.template2-design .resume-sidebar {
    background: #af1c1c;
    color: white;
    padding: 30px 20px;
}

.template2-design .resume-sidebar .resume-name {
    font-size: 24px;
    margin-bottom: 20px;
    font-weight: bold;
    word-wrap: break-word;
}

.template2-design .resume-sidebar .contact-info {
    font-size: 12px;
    margin-bottom: 20px;
    word-wrap: break-word;
}

.template2-design .resume-sidebar .contact-info p {
    margin: 5px 0;
}

.template2-design .resume-sidebar .section-title {
    font-size: 16px;
    margin-top: 20px;
    margin-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    padding-bottom: 5px;
    font-weight: bold;
}

.template2-design .resume-sidebar .skill-item {
    font-size: 13px;
    margin: 8px 0;
    padding-left: 10px;
}

.template2-design .resume-main {
    padding: 30px;
    background: #ffffff;
    color: #333;
}

.template2-design .resume-main .section-title {
    font-size: 20px;
    color: #af1c1c;
    border-bottom: 2px solid #af1c1c;
    padding-bottom: 5px;
    margin-bottom: 15px;
    margin-top: 25px;
    font-weight: bold;
}

.template2-design .resume-main .section-item {
    margin-bottom: 20px;
}

.template2-design .resume-main .item-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 5px;
}

.template2-design .resume-main .item-header h3 {
    font-size: 18px;
    color: #333;
    font-weight: bold;
    margin: 0;
}

.template2-design .resume-main .item-date {
    font-size: 14px;
    color: #666;
    font-style: italic;
}

.template2-design .resume-main .item-subtitle {
    font-size: 16px;
    color: #555;
    margin: 5px 0;
}

.template2-design .resume-main .item-detail,
.template2-design .resume-main .item-description {
    font-size: 14px;
    color: #666;
    margin: 5px 0;
    line-height: 1.5;
}

/* Template 3 - Creative Bold */
.template3-design {
    background: #ffffff;
    padding: 30px;
}

.template3-design .resume-header-bold {
    background: #16b439;
    color: white;
    padding: 30px;
    margin: -30px -30px 30px -30px;
    text-align: center;
}

.template3-design .resume-header-bold .resume-name {
    font-size: 36px;
    margin-bottom: 10px;
    font-weight: bold;
    letter-spacing: 2px;
}

.template3-design .resume-header-bold .contact-info {
    font-size: 14px;
}

.template3-design .section-title-bold {
    font-size: 18px;
    color: #16b439;
    font-weight: bold;
    letter-spacing: 2px;
    margin-top: 25px;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 3px solid #16b439;
}

.template3-design .section-item {
    margin-bottom: 20px;
    padding-left: 10px;
}

.template3-design .item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}

.template3-design .item-header h3 {
    font-size: 18px;
    color: #333;
    font-weight: bold;
    margin: 0 0 5px 0;
}

.template3-design .item-date {
    font-size: 14px;
    color: #16b439;
    font-weight: bold;
    white-space: nowrap;
    margin-left: 15px;
}

.template3-design .item-subtitle {
    font-size: 15px;
    color: #555;
    margin: 0 0 8px 0;
    font-style: italic;
}

.template3-design .item-detail,
.template3-design .item-description {
    font-size: 14px;
    color: #666;
    margin: 5px 0;
    line-height: 1.6;
}

.template3-design .skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
}

.template3-design .skill-badge {
    background: linear-gradient(135deg, #16b439, #0d8028);
    color: white;
    padding: 8px 15px;
    border-radius: 5px;
    font-size: 14px;
    text-align: center;
    font-weight: bold;
}

/* Responsive Styles */
@media (max-width: 768px) {
    header {
        flex-direction: column;
        align-items: flex-start;
        padding: 15px;
    }

    header h1 {
        margin-bottom: 15px;
        font-size: 20px;
    }

    nav ul {
        flex-direction: row;
        flex-wrap: wrap;
    }

    nav ul li {
        margin-left: 0;
        margin-right: 15px;
        margin-bottom: 5px;
    }

    form {
        padding: 20px;
    }

    h2 {
        font-size: 26px;
    }

    h3 {
        font-size: 20px;
        margin-top: 30px;
    }

    input,
    textarea,
    select {
        font-size: 16px;
    }

    .form-actions {
        flex-direction: column;
    }

    .form-actions button {
        width: 100%;
        margin-bottom: 10px;
    }

    .btn-primary,
    .btn-secondary {
        padding: 14px 20px;
    }

    .template2-design {
        grid-template-columns: 1fr;
    }

    .template2-design .resume-sidebar {
        padding: 20px;
    }

    #real-time-preview {
        margin: 20px 10px;
    }
}

/* Suggestion Styles */
.suggestions {
    position: absolute;
    background-color: #1e1e1e; /* Slightly lighter dark background */
    border: 1px solid #3a3a3a; /* Subtle border */
    border-radius: 8px;
    max-height: 250px; /* Increased height for better UX */
    overflow-y: auto;
    box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.5), 0px 0px 1px rgba(255, 255, 255, 0.1); /* Enhanced shadow */
    z-index: 1000;
    display: none; /* Hidden by default */
    margin-top: 4px;
    animation: fadeIn 0.15s ease-in-out;
}

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

/* Custom scrollbar for suggestions */
.suggestions::-webkit-scrollbar {
    width: 8px;
}

.suggestions::-webkit-scrollbar-track {
    background: #2a2a2a;
    border-radius: 4px;
}

.suggestions::-webkit-scrollbar-thumb {
    background: #4a4a4a;
    border-radius: 4px;
}

.suggestions::-webkit-scrollbar-thumb:hover {
    background: #5a5a5a;
}

.suggestion {
    padding: 10px 14px;
    cursor: pointer;
    color: #e0e0e0; /* Lighter text */
    transition: all 0.12s ease-in-out;
    border-bottom: 1px solid #2a2a2a;
    font-size: 14px;
    line-height: 1.4;
}

.suggestion:last-child {
    border-bottom: none;
}

.suggestion:hover,
.suggestion.focused {
    background-color: #2a5db0; /* Modern blue highlight */
    color: #ffffff; /* White text */
    padding-left: 18px; /* Subtle indent on hover */
}

.suggestion:active {
    background-color: #1e4a8a; /* Darker blue on click */
}

/* Highlighted search matches */
.suggestion strong {
    font-weight: 600;
    color: #64b5f6; /* Bright blue for matches */
    background-color: rgba(100, 181, 246, 0.15); /* Subtle background */
    padding: 1px 2px;
    border-radius: 3px;
}

.suggestion:hover strong,
.suggestion.focused strong {
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.2);
}

/* Empty state styling */
.suggestion.empty-state {
    cursor: default;
    color: #888888;
    text-align: center;
    font-style: italic;
    padding: 16px 14px;
    border-bottom: none;
}

.suggestion.empty-state:hover {
    background-color: transparent;
    padding-left: 14px; /* No indent for empty state */
    color: #888888;
}

/* Focused state for keyboard navigation */
.suggestion.focused {
    outline: 2px solid #64b5f6;
    outline-offset: -2px;
}

/* Accessibility - high contrast mode support */
@media (prefers-contrast: high) {
    .suggestions {
        border: 2px solid #ffffff;
    }

    .suggestion {
        border-bottom: 1px solid #666666;
    }

    .suggestion:hover,
    .suggestion.focused {
        background-color: #0066cc;
        outline: 3px solid #ffffff;
    }
}

/* User Dashboard Styles */
.dashboard-container {
    background-color: #121212; /* Dark background */
    color: #ffffff; /* White text */
    padding: 40px;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.2); /* White box shadow */
}

.dashboard-container h2 {
    font-size: 28px;
    margin-bottom: 20px;
}

.resume-list {
    margin-bottom: 20px;
}

.resume-item {
    border-bottom: 1px solid #ffffff; /* White border */
    padding: 20px 0;
}

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

.resume-item h3 {
    margin-bottom: 5px;
}

.resume-item p {
    margin-bottom: 10px;
}

.resume-actions button {
    background: linear-gradient(135deg, #2196F3 0%, #1976D2 100%);
    color: #ffffff;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    margin-right: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    box-shadow: 0 2px 4px rgba(33, 150, 243, 0.3);
}

.resume-actions button:hover {
    background: linear-gradient(135deg, #1976D2 0%, #1565C0 100%);
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(33, 150, 243, 0.4);
}

.profile-settings {
    margin-top: 20px;
}

.profile-settings h3 {
    font-size: 22px;
    margin-bottom: 15px;
}

.profile-settings ul {
    list-style-type: none;
}

.profile-settings ul li {
    margin-bottom: 10px;
}

.profile-settings ul li a {
    color: #ffffff; /* White text */
    text-decoration: none;
}

.profile-settings ul li a:hover {
    color: #64b5f6;
}

.third-party-integration a {
    background: linear-gradient(135deg, #2196F3 0%, #1976D2 100%);
    color: #ffffff;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 6px;
    display: inline-block;
    margin-top: 10px;
    transition: all 0.3s ease;
    font-weight: 500;
    box-shadow: 0 2px 4px rgba(33, 150, 243, 0.3);
}

.third-party-integration a:hover {
    background: linear-gradient(135deg, #1976D2 0%, #1565C0 100%);
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(33, 150, 243, 0.4);
}

/* Footer Styles */
.footer {
    background-color: #121212; /* Dark background */
    color: #ffffff; /* White text */
    text-align: center;
    padding: 20px;
    margin-top: 20px;
    border-top-left-radius: 5px;
    border-top-right-radius: 5px;
}

.footer p {
    margin: 0;
}

.footer p a {
    color: #64b5f6;
    text-decoration: none;
}

.footer p a:hover {
    text-decoration: underline;
    color: #2196F3;
}

/* Popup styles */
.popup {
    display: none; /* Hidden by default */
    position: fixed; /* Stay in place */
    z-index: 1000; /* Sit on top */
    left: 0;
    top: 0;
    width: 100%; /* Full width */
    height: 100%; /* Full height */
    overflow: auto; /* Enable scrolling if needed */
    background-color: rgba(18, 18, 18, 0.5); /* Dark background with opacity */
    backdrop-filter: blur(3px); /* Apply 3px blur to the background */
}

/* Popup content size */
.popup-content {
    background-color: #8e8d8d; /* White background */
    margin: 10% auto; /* Centered with a bit more space from the top */
    padding: 20px;
    border: 1px solid #ffffff; /* White border */
    max-width: 400px; /* Limiting the maximum width */
    width: calc(100% - 40px); /* Set width to 100% of the viewport width minus padding */
    border-radius: 10px;
    animation: zoomIn 0.5s ease; /* Zoom in animation */
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.2); /* White box shadow */
    overflow-y: hidden; /* Hide vertical scrollbar for the form */
}

/* Close button */
.close {
    color: #ffffff; /* White text */
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 24px;
    transition: color 0.3s ease;
    cursor: pointer; /* Change cursor to pointer */
}

.close:hover,
.close:focus {
    color: #aaaaaa; /* Light gray on hover */
}

/* Login form styles */
.login-form {
    margin-top: 20px;
}

.form-group {
    margin-bottom: 20px;
    position: relative; /* Ensure suggestions dropdown is positioned relative to form-group */
}

label {
    display: block;
    font-weight: bold;
    margin-bottom: 5px;
    color: #8e8d8d; /* White text */
}

input[type="email"],
input[type="password"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #8e8d8d; /* White border */
    border-radius: 5px;
    transition: border-color 0.3s ease; /* Add transition for border color */
    background-color: transparent; /* Transparent background */
    color: #8e8d8d; /* White text */
}

input[type="email"]:focus,
input[type="password"]:focus {
    border-color: #2196F3;
    box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.1);
}

button.login-btn {
    display: block;
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #2196F3 0%, #1976D2 100%);
    color: #ffffff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(33, 150, 243, 0.3);
}

button.login-btn:hover {
    background: linear-gradient(135deg, #1976D2 0%, #1565C0 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.4);
}

/* Registration link styles */
.register-link {
    margin-top: 10px;
    text-align: center;
}

.register-link a {
    color: #64b5f6;
    text-decoration: none;
    transition: color 0.3s ease;
    font-weight: 500;
}

.register-link a:hover {
    text-decoration: underline;
    color: #2196F3;
}

/* Dynamic Entry Styles */
.dynamic-entry {
    border: 2px solid #2196F3;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 8px;
    background: rgba(33, 150, 243, 0.05);
    transition: all 0.3s ease;
}

.dynamic-entry:hover {
    background: rgba(33, 150, 243, 0.08);
    box-shadow: 0 2px 8px rgba(33, 150, 243, 0.2);
}

.entry-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.entry-header h4 {
    color: #64b5f6;
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.remove-entry-btn {
    background-color: #f44336;
    color: white;
    border: none;
    padding: 5px 15px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 12px;
    transition: background-color 0.3s ease;
}

.remove-entry-btn:hover {
    background-color: #d32f2f;
}

.add-entry-btn {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    cursor: pointer;
    margin-bottom: 25px;
    width: 100%;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(76, 175, 80, 0.3);
}

.add-entry-btn:hover {
    background: linear-gradient(135deg, #45a049 0%, #388E3C 100%);
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(76, 175, 80, 0.4);
}

/* Skill Entry Styles */
.skill-input-group {
    display: flex;
    gap: 10px;
    align-items: center;
}

.skill-input-group input {
    flex: 1;
}

.remove-skill-btn {
    background-color: #f44336;
    color: white;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    transition: background-color 0.3s ease;
}

.remove-skill-btn:hover {
    background-color: #d32f2f;
}

/* Form Actions */
.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.form-actions button {
    flex: 1;
    min-width: 150px;
}

.btn-primary {
    background: linear-gradient(135deg, #2196F3 0%, #1976D2 100%);
    color: #ffffff;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(33, 150, 243, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #1976D2 0%, #1565C0 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.4);
}

.btn-secondary {
    background-color: #424242;
    color: #ffffff;
    border: 2px solid #616161;
    padding: 12px 24px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background-color: #616161;
    border-color: #757575;
    transform: translateY(-1px);
}

/* Tooltip Styles */
.tooltip-icon {
    display: inline-block;
    margin-left: 5px;
    width: 18px;
    height: 18px;
    background: rgba(100, 181, 246, 0.2);
    border-radius: 50%;
    text-align: center;
    line-height: 18px;
    font-size: 12px;
    color: #64b5f6;
    cursor: help;
    position: relative;
    transition: all 0.3s ease;
}

.tooltip-icon:hover {
    background: rgba(100, 181, 246, 0.3);
    transform: scale(1.1);
}

.tooltip-icon::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-10px);
    background: #2a2a2a;
    color: #ffffff;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 13px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    border: 1px solid #64b5f6;
    z-index: 1000;
    max-width: 250px;
    white-space: normal;
    font-weight: normal;
    line-height: 1.4;
}

.tooltip-icon:hover::after {
    opacity: 1;
    transform: translateX(-50%) translateY(-5px);
}

/* Field Error Styles */
.field-error {
    display: block;
    color: #f44336;
    font-size: 13px;
    margin-top: 5px;
    min-height: 18px;
    font-weight: 500;
}

input.error,
textarea.error,
select.error {
    border-color: #f44336 !important;
    background-color: rgba(244, 67, 54, 0.05) !important;
}

/* Button Icon Styles */
.btn-icon {
    display: inline-block;
    margin-right: 5px;
    font-size: 16px;
}

/* Loading State for Buttons */
button.loading {
    position: relative;
    pointer-events: none;
    opacity: 0.7;
}

button.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Back to Top Button Hover */
.back-to-top-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(33, 150, 243, 0.5);
}

.back-to-top-btn:active {
    transform: translateY(-1px);
}

/* Keyboard Shortcuts Button */
#shortcuts-help-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(156, 39, 176, 0.5);
}

#shortcuts-help-btn:active {
    transform: translateY(-1px);
}

/* Character Counter */
.char-counter {
    transition: color 0.3s ease;
}

.char-counter.warning {
    color: #FF9800 !important;
}

.char-counter.danger {
    color: #f44336 !important;
    font-weight: 600;
}

/* Progress Container Styles */
.progress-container {
    padding: 20px;
    background: linear-gradient(145deg, #1a1a1a, #252525);
    border-radius: 12px;
    border: 1px solid #2a2a2a;
}

/* Autosave Animation */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.autosave-saving {
    color: #FF9800 !important;
    animation: pulse 1.5s ease-in-out infinite;
}

.autosave-saved {
    color: #4CAF50 !important;
}

.autosave-error {
    color: #f44336 !important;
}

/* Improve Form Actions on Mobile */
@media (max-width: 768px) {
    .tooltip-icon::after {
        left: auto;
        right: 0;
        transform: translateX(0) translateY(-10px);
    }

    .tooltip-icon:hover::after {
        transform: translateX(0) translateY(-5px);
    }

    .back-to-top-btn {
        bottom: 20px !important;
        right: 20px !important;
        width: 45px !important;
        height: 45px !important;
        font-size: 20px !important;
    }
}

/* Languages Section Styles - Shared across all templates */
.languages-list .language-item,
.languages-grid .language-item {
    margin-bottom: 10px;
    color: #333;
    line-height: 1.5;
}

.template1-design .languages-list .language-item {
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

.template2-design .resume-sidebar .languages-list .language-item {
    margin-bottom: 12px;
    color: white;
}

.template2-design .resume-main .summary-text {
    color: #333;
    line-height: 1.7;
    text-align: justify;
    font-size: 15px;
}

.template3-design .languages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}

.template3-design .languages-grid .language-item {
    background: #f5f5f5;
    padding: 10px 15px;
    border-radius: 5px;
    border-left: 3px solid #16b439;
}

.template3-design .summary-text {
    color: #333;
    line-height: 1.7;
    text-align: justify;
    font-size: 15px;
}

/* Project and Certification specific styles */
.section-item h3 {
    margin: 0 0 8px 0;
    color: inherit;
    border: none;
    padding: 0;
}

/* Character counter for textareas */
.char-counter {
    text-align: right;
    font-size: 12px;
    color: #888;
    margin-top: 5px;
}

/* Enhanced project entry and certification entry styles */
.project-entry,
.certification-entry,
.language-entry {
    border: 2px solid #2196F3;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 8px;
    background: rgba(33, 150, 243, 0.05);
    transition: all 0.3s ease;
}

.project-entry:hover,
.certification-entry:hover,
.language-entry:hover {
    background: rgba(33, 150, 243, 0.08);
    box-shadow: 0 2px 8px rgba(33, 150, 243, 0.2);
}
/* ====================================================================
   MOBILE RESPONSIVENESS & MEDIA QUERIES
   ==================================================================== */

/* Tablet screens (768px and below) */
@media screen and (max-width: 768px) {
    header {
        flex-direction: column;
        padding: 15px;
    }

    header h1 {
        font-size: 20px;
        margin-bottom: 10px;
    }

    nav ul {
        flex-direction: column;
        align-items: center;
    }

    nav ul li {
        margin: 5px 0;
    }

    form {
        padding: 25px;
    }

    h2 {
        font-size: 26px;
    }

    h3 {
        font-size: 20px;
    }

    section#feature h2 {
        font-size: 28px;
    }

    section#feature p {
        font-size: 16px;
    }

    section {
        padding: 30px 15px;
    }

    /* Form actions grid */
    .form-actions {
        grid-template-columns: 1fr !important;
        gap: 10px !important;
    }

    /* Dashboard and resume list */
    .dashboard-container {
        padding: 20px;
    }

    .resume-item {
        padding: 15px;
    }

    /* Real-time preview */
    #real-time-preview {
        padding: 15px;
        min-height: 300px;
    }

    /* Template designs */
    .template1-design,
    .template2-design,
    .template3-design,
    .template4-design,
    .template5-design,
    .template6-design {
        padding: 20px !important;
    }

    /* Resume header in templates */
    .resume-name {
        font-size: 24px !important;
    }

    .contact-info {
        font-size: 11px !important;
    }

    .section-title {
        font-size: 18px !important;
    }

    /* Skill tags */
    .skill-tag {
        font-size: 11px !important;
        padding: 4px 10px !important;
    }

    /* Back to top button */
    #back-to-top {
        bottom: 20px !important;
        right: 20px !important;
        width: 45px !important;
        height: 45px !important;
        font-size: 20px !important;
    }

    /* Shortcuts button */
    #shortcuts-help-btn {
        bottom: 75px !important;
        right: 20px !important;
        width: 45px !important;
        height: 45px !important;
    }

    /* Popup and modal adjustments */
    .popup-content {
        width: 90% !important;
        margin: 10% auto !important;
        padding: 25px !important;
    }

    /* Progress container */
    .progress-container {
        margin-bottom: 20px !important;
    }

    /* Resume tips grid */
    .tips-grid {
        grid-template-columns: 1fr !important;
    }

    /* Entry headers */
    .entry-header {
        flex-direction: column;
        align-items: flex-start !important;
    }

    .entry-header h4 {
        margin-bottom: 10px;
    }

    .entry-header .remove-entry-btn {
        width: 100%;
    }
}

/* Mobile screens (480px and below) */
@media screen and (max-width: 480px) {
    body {
        font-size: 14px;
    }

    header h1 {
        font-size: 18px;
    }

    form {
        padding: 20px;
        border-radius: 8px;
    }

    h2 {
        font-size: 22px;
    }

    h3 {
        font-size: 18px;
    }

    section#feature {
        padding: 50px 15px;
    }

    section#feature h2 {
        font-size: 24px;
    }

    section#feature p {
        font-size: 14px;
    }

    input[type="text"],
    input[type="email"],
    input[type="tel"],
    textarea,
    select {
        padding: 10px 12px;
        font-size: 14px;
    }

    label {
        font-size: 13px;
    }

    .cta,
    button[type="submit"],
    .download-btn,
    .share-btn,
    .btn-primary,
    .btn-secondary {
        padding: 10px 20px;
        font-size: 14px;
    }

    .add-entry-btn {
        padding: 8px 16px;
        font-size: 13px;
    }

    /* Resume templates mobile adjustments */
    .resume-name {
        font-size: 20px !important;
    }

    .contact-info {
        font-size: 10px !important;
        flex-direction: column;
        align-items: center;
    }

    .contact-info span {
        margin: 3px 0 !important;
        display: block !important;
    }

    .section-title {
        font-size: 16px !important;
    }

    .item-description,
    .summary-text {
        font-size: 12px !important;
    }

    /* Two column layouts to single column */
    .template2-design .resume-container {
        grid-template-columns: 1fr !important;
    }

    .template4-design .resume-container {
        grid-template-columns: 1fr !important;
    }

    /* Dashboard */
    .resume-actions {
        flex-direction: column;
        gap: 8px;
    }

    .resume-actions button {
        width: 100%;
    }

    /* Back to top button - smaller on mobile */
    #back-to-top {
        bottom: 15px !important;
        right: 15px !important;
        width: 40px !important;
        height: 40px !important;
        font-size: 18px !important;
    }

    #shortcuts-help-btn {
        bottom: 65px !important;
        right: 15px !important;
        width: 40px !important;
        height: 40px !important;
        font-size: 16px !important;
    }

    /* Popups full screen on mobile */
    .popup-content {
        width: 95% !important;
        max-width: none !important;
        margin: 5% auto !important;
        padding: 20px !important;
        max-height: 90vh;
        overflow-y: auto;
    }

    /* Tooltip adjustments */
    .tooltip-icon {
        font-size: 14px;
        padding: 2px 6px;
    }

    /* Notification adjustments */
    .notification {
        right: 10px !important;
        left: 10px !important;
        max-width: none !important;
    }

    /* Character counter */
    .char-counter {
        font-size: 11px;
    }

    /* Progress bar text */
    .progress-header {
        flex-direction: column;
        align-items: flex-start !important;
    }

    .progress-header span {
        margin-bottom: 5px;
    }

    /* Skill tags wrap better */
    .skills-list,
    .template1-design .skills-list {
        gap: 6px !important;
    }

    .skill-tag {
        font-size: 10px !important;
        padding: 3px 8px !important;
    }

    /* Form grid to single column */
    .skill-input-group {
        flex-direction: column;
    }

    .skill-input-group input {
        margin-bottom: 8px;
    }

    .remove-skill-btn {
        width: 100%;
    }
}

/* Very small screens (360px and below) */
@media screen and (max-width: 360px) {
    header {
        padding: 10px;
    }

    form {
        padding: 15px;
    }

    section#feature {
        padding: 40px 10px;
    }

    h2 {
        font-size: 20px;
    }

    h3 {
        font-size: 16px;
    }

    .template1-design,
    .template2-design,
    .template3-design,
    .template4-design,
    .template5-design,
    .template6-design {
        padding: 15px !important;
    }

    .resume-name {
        font-size: 18px !important;
    }

    button,
    .btn-primary,
    .btn-secondary {
        padding: 8px 16px;
        font-size: 13px;
    }
}

/* Landscape mode on mobile devices */
@media screen and (max-height: 600px) and (orientation: landscape) {
    header {
        padding: 10px 20px;
    }

    section#feature {
        padding: 40px 20px;
    }

    form {
        padding: 25px;
    }

    .popup-content {
        max-height: 85vh;
        overflow-y: auto;
    }
}

/* Print styles for PDF generation */
@media print {
    header,
    nav,
    footer,
    .form-actions,
    .add-entry-btn,
    .remove-entry-btn,
    #back-to-top,
    #shortcuts-help-btn,
    .progress-container,
    .tooltip-icon {
        display: none !important;
    }

    body {
        background: white;
        color: black;
    }

    #real-time-preview {
        border: none;
        box-shadow: none;
        margin: 0;
        padding: 0;
    }

    .resume-template {
        page-break-after: auto;
    }

    .section-item {
        page-break-inside: avoid;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    input[type="text"],
    input[type="email"],
    input[type="tel"],
    textarea,
    select {
        border-width: 3px;
    }

    button,
    .btn-primary,
    .btn-secondary {
        border: 2px solid currentColor;
    }
}

/* Reduced motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Dark mode support (if OS prefers dark) */
@media (prefers-color-scheme: dark) {
    /* Already using dark theme, but can add specific overrides if needed */
    body {
        background-color: #0a0a0a;
    }

    form {
        background: linear-gradient(145deg, #0f0f0f, #1a1a1a);
    }
}

/* ====================================================================
   END OF MOBILE RESPONSIVENESS
   ==================================================================== */
