/* Global Styles */
:root {
    --primary-color: #4361ee;
    --secondary-color: #3a0ca3;
    --accent-color: #7209b7;
    --dark-color: #2b2d42;
    --light-color: #f8f9fa;
    --success-color: #38b000;
    --warning-color: #ffaa00;
    --border-radius: 12px;
    --box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  }
  
  * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
  }
  
  body {
    font-family: 'Roboto', sans-serif;
    line-height: 1.7;
    color: #333;
    background-color: #fafbff;
    overflow-x: hidden;
  }
  
  .container {
    width: 90%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 15px;
  }
  
  a {
    text-decoration: none;
    color: inherit;
  }
  
  /* Header Styles */
  header {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 18px 0;
    transition: all 0.3s ease;
    margin-bottom: 20px;
  }
  
  header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  
  .logo h2 {
    color: var(--primary-color);
    font-weight: 700;
    font-size: 28px;
    letter-spacing: -0.5px;
    position: relative;
  }
  
  .logo h2::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 40px;
    height: 3px;
    background: linear-gradient(to right, var(--primary-color), var(--accent-color));
    border-radius: 3px;
  }
  
  nav {
    display: flex;
    align-items: center;
  }
  
  .nav-links {
    display: flex;
    align-items: center;
  }
  
  .nav-link {
    margin: 0 18px;
    font-weight: 500;
    color: #555;
    transition: var(--transition);
    position: relative;
    padding: 5px 0;
  }
  
  .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: var(--transition);
  }
  
  .nav-link:hover {
    color: var(--primary-color);
  }
  
  .nav-link:hover::after {
    width: 100%;
  }
  
  .auth-links {
    display: flex;
    align-items: center;
    gap: 15px;
  }
  
  /* Make dropdown inline */
  .dropdown {
    position: relative;
    display: inline-block;
  }
  
  /* Dropdown menu styling */
  .dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: white;
    min-width: 160px;
    box-shadow: var(--box-shadow);
    border-radius: var(--border-radius);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: var(--transition);
    z-index: 999;
  }
  
  .dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }
  
  .dropdown-item {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    color: #555;
    font-weight: 500;
    text-decoration: none;
    transition: var(--transition);
  }
  
  .dropdown-item:hover {
    background-color: var(--light-color);
    color: var(--primary-color);
  }
  
  .dropdown-icon {
    width: 20px;
    height: 20px;
    margin-right: 10px;
    object-fit: contain;
  }
  
  
  /* Button Styles */
  .btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: var(--border-radius);
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    letter-spacing: 0.5px;
    font-size: 0.95rem;
  }
  
  .btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    box-shadow: 0 4px 15px rgba(67, 97, 238, 0.3);
  }
  
  .btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(67, 97, 238, 0.4);
  }
  
  .btn-primaryy {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: 2px solid white;
    box-shadow: 0 4px 15px rgba(67, 97, 238, 0.3);
  }
  
  .btn-primaryy:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(67, 97, 238, 0.4);
  }
  
  .btn-outline {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    position: relative;
    z-index: 1;
    overflow: hidden;
  }
  
  .btn-outline:hover {
    color: white;
  }
  
  .btn-outline::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background-color: var(--primary-color);
    transition: 0.5s ease;
    z-index: -1;
  }
  
  .btn-outline:hover::before {
    width: 100%;
  }
  
  
  /* Img & Instruction Box */
  .rectangle-box {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    /* Align text at the top */
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 20px;
    padding: 80px;
    margin: 10px auto;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    width: 95%;
    /* Increased from 90% */
    max-width: 1300px;
    /* Increased from 1000px */
    position: relative;
    /* Allow absolute positioning for the image */
  }
  
  .box-title {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-size: 40px;
    font-weight: bold;
    margin: 0;
  }
  
  
  .text-content {
    flex: 2;
    padding-right: 20px;
  }
  
  .text-content p {
    margin: 5px 0;
    font-size: 16px;
    color: hsl(0, 0%, 100%);
  }
  
  .image-content {
    position: absolute;
    /* Absolute positioning to place image at bottom-right */
    bottom: 10px;
    /* Distance from the bottom */
    right: 10px;
    /* Distance from the right */
  }
  
  .image-content img {
    max-width: 300px;
    height: 200px;
    border-radius: 10px;
  }
  
  .file-box-container {
    display: flex;
    justify-content: center;
    align-items: stretch;
    width: 90%;
    max-width: 1000px;
    margin: 0 auto;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    overflow: hidden;
  }
  
  .upload-section {
    border: 3px dashed var(--primary-color);
    padding: 60px;
    width: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: #f9f9f9;
  }
  
  .result-section {
    border: 3px solid transparent;
    border-image: linear-gradient(135deg, #4361ee, #3a0ca3) 1;
    padding: 60px;
    width: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: linear-gradient(135deg, #4361ee, #3a0ca3);
  }
  
  .upload-section button,
  .result-section button {
    margin: 10px;
    padding: 10px 20px;
  }


  /* Signer Container */
.signer-container {
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 30px;
    margin: 20px auto;
    max-width: 800px;
}

/* Tab Styles */
.tab {
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
    gap: 20px;
}

/* Form Section Styles */
.form-section {
    display: none;
    border: 1px solid #ccc;
    padding: 20px;
    border-radius: 10px;
    margin: 20px auto;
    background-color: white;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.form-section.active {
    display: block;
}

.form-section h2 {
    color: var(--primary-color);
    margin-bottom: 20px;
    text-align: center;
}

.form-section label {
    display: block;
    margin-top: 15px;
    font-weight: bold;
    color: #333;
}

.form-section input[type="file"],
.form-section input[type="text"],
.form-section input[type="number"] {
    margin-top: 5px;
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

.submit-btn {
    margin-top: 20px;
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: var(--transition);
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(67, 97, 238, 0.3);
}

/* Status Messages */
#status {
    margin-top: 20px;
    padding: 15px;
    border-radius: 5px;
    text-align: center;
    display: none;
}

.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Loading Spinner */
.loading {
    display: none;
    text-align: center;
    margin-top: 20px;
    color: var(--primary-color);
    font-weight: 500;
}

.spinner {
    border: 4px solid rgba(0, 0, 0, 0.1);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border-left-color: var(--primary-color);
    animation: spin 1s linear infinite;
    display: inline-block;
    vertical-align: middle;
    margin-right: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Debug Section */
#debug-section {
    margin-top: 30px;
    padding: 15px;
    border: 1px dashed #ccc;
    background-color: #f9f9f9;
    display: none;
    border-radius: 5px;
}

#debug-log {
    margin-top: 10px;
    font-family: monospace;
    background-color: white;
    padding: 10px;
    border-radius: 5px;
    max-height: 200px;
    overflow-y: auto;
}
  
  /* Footer Section */
  footer {
    background-color: var(--dark-color);
    color: white;
    padding: 20px 0 30px;
    position: relative;
    overflow: hidden;
    margin-top: 60px;
  }
  
  footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
  }
  
  .footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
  }
  
  .footer-logo h3 {
    font-size: 24px;
    margin-bottom: 20px;
    color: white;
  }
  
  .footer-logo p {
    color: #bbb;
    margin-bottom: 20px;
    line-height: 1.7;
  }
  
  .footer-section h4 {
    font-size: 18px;
    margin-bottom: 25px;
    color: white;
    position: relative;
    padding-bottom: 10px;
  }
  
  .footer-section h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    border-radius: 3px;
  }
  
  .footer-links {
    list-style: none;
  }
  
  .footer-links li {
    margin-bottom: 12px;
  }
  
  .footer-links a {
    color: #bbb;
    transition: all 0.3s ease;
    position: relative;
    padding-left: 15px;
  }
  
  .footer-links a::before {
    content: '→';
    position: absolute;
    left: 0;
    opacity: 0;
    transition: all 0.3s ease;
  }
  
  .footer-links a:hover {
    color: white;
    padding-left: 20px;
  }
  
  .footer-links a:hover::before {
    opacity: 1;
  }
  
  .social-links {
    display: flex;
    gap: 15px;
    margin-top: 20px;
  }
  
  .social-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease;
  }
  
  .social-icon:hover {
    background-color: var(--primary-color);
    transform: translateY(-5px);
  }
  
  .footer-bottom {
    text-align: center;
    padding-top: 20px;
    /* border-top: 1px solid rgba(255, 255, 255, 0.1); */
    color: #aaa;
    font-size: 0.9rem;
  }