/* Reset and Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background-color: #0A0A0A;
  color: #cce6f6;
  font-family: 'Segoe UI', sans-serif;
  line-height: 1.6;
  padding: 20px;
}

/* Header */
.site-header {
  text-align: center;
  margin-bottom: 30px;
}

.logo {
  width: 100px;
  margin-bottom: 10px;
}

.site-header h1 {
  font-size: 2.4rem;
  color: #ffffff;
}

.site-header p {
  color: #cce6f6;
  font-size: 1.1rem;
  margin-top: 8px;
}

/* Cards Grid */
.card-container {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
  margin-top: 30px;
}

.tool-card {
  background: linear-gradient(to bottom right, #0077b6, #023e8a);
  color: #ffffff;
  padding: 25px 20px;
  border-radius: 15px;
  text-align: center;
  font-size: 1.1rem;
  font-weight: bold;
  box-shadow: 0 4px 10px rgba(0,0,0,0.5);
  transition: all 0.3s ease;
  text-decoration: none;
  flex: 1 1 280px;
  max-width: 320px;
}

.tool-card:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 16px rgba(0,0,0,0.7);
  cursor: pointer;
}

/* Footer */
.site-footer {
  text-align: center;
  color: #999;
  margin-top: 50px;
  font-size: 0.9rem;
  padding: 10px;
}

/* Responsive Tweaks */
@media (max-width: 768px) {
  .site-header h1 {
    font-size: 2rem;
  }

  .site-header p {
    font-size: 1rem;
  }

  .tool-card {
    font-size: 1rem;
    padding: 20px;
  }
}

@media (max-width: 480px) {
  .tool-card {
    font-size: 0.95rem;
    padding: 18px;
  }

  .logo {
    width: 80px;
  }

  .site-header h1 {
    font-size: 1.6rem;
  }

  .site-header p {
    font-size: 0.95rem;
  }
}

/* Login and Registration Styles */
.login-container {
    max-width: 450px;
    margin: 50px auto;
    padding: 30px;
    background: linear-gradient(145deg, #ffffff, #f5f5f5);
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.login-container:hover {
    transform: translateY(-5px);
}

.login-container h2 {
    color: #2c3e50;
    text-align: center;
    margin-bottom: 25px;
    font-size: 28px;
    font-weight: 600;
}

.form-group {
    margin-bottom: 20px;
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #34495e;
    font-weight: 500;
    font-size: 15px;
}

.form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.form-group input:focus {
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
    outline: none;
    background: #ffffff;
}

.login-container button {
    width: 100%;
    padding: 14px;
    background: linear-gradient(45deg, #3498db, #2980b9);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.login-container button:hover {
    background: linear-gradient(45deg, #2980b9, #3498db);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.3);
}

.login-container button:active {
    transform: translateY(0);
}

.login-container p {
    text-align: center;
    margin-top: 20px;
    color: #7f8c8d;
}

.login-container a {
    color: #3498db;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.login-container a:hover {
    color: #2980b9;
    text-decoration: underline;
}

.error {
    color: #e74c3c;
    padding: 12px;
    margin-bottom: 20px;
    background: #fde8e8;
    border-radius: 8px;
    border-left: 4px solid #e74c3c;
    font-size: 14px;
    animation: shake 0.5s ease-in-out;
}

.success {
    color: #27ae60;
    padding: 12px;
    margin-bottom: 20px;
    background: #e8f8e8;
    border-radius: 8px;
    border-left: 4px solid #27ae60;
    font-size: 14px;
    animation: slideIn 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

@keyframes slideIn {
    from { transform: translateY(-10px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* Password strength indicator */
.password-strength {
    height: 4px;
    margin-top: 8px;
    border-radius: 2px;
    background: #eee;
    overflow: hidden;
}

.password-strength-bar {
    height: 100%;
    width: 0;
    transition: width 0.3s ease, background-color 0.3s ease;
}

/* Form validation styles */
.form-group input:invalid {
    border-color: #e74c3c;
}

.form-group input:valid {
    border-color: #2ecc71;
}

/* Responsive adjustments */
@media (max-width: 480px) {
    .login-container {
        margin: 20px;
        padding: 20px;
    }
    
    .login-container h2 {
        font-size: 24px;
    }
    
    .form-group input {
        padding: 10px;
    }
    
    .login-container button {
        padding: 12px;
    }
}

/* User Menu Styles */
.user-menu {
    margin-top: 15px;
    text-align: right;
}

.login-btn, .register-btn, .logout-btn {
    display: inline-block;
    padding: 8px 15px;
    margin-left: 10px;
    text-decoration: none;
    border-radius: 4px;
    color: #fff;
}

.login-btn {
    background: #007bff;
}

.register-btn {
    background: #28a745;
}

.logout-btn {
    background: #dc3545;
}

/* Login Required Message */
.login-required {
    text-align: center;
    padding: 50px 20px;
    background: #f8f9fa;
    border-radius: 8px;
    margin: 20px auto;
    max-width: 600px;
}

.login-required h2 {
    color: #333;
    margin-bottom: 15px;
}

.login-required a {
    color: #007bff;
    text-decoration: none;
}

.login-required a:hover {
    text-decoration: underline;
}

/* Locked Tool Card Styles */
.tool-card-locked {
    position: relative;
    opacity: 0.8;
    filter: grayscale(0.3);
    cursor: not-allowed;
}

.tool-card-locked:hover {
    transform: none;
    box-shadow: 0 4px 10px rgba(0,0,0,0.5);
}

.login-required-tooltip {
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.tool-card-locked:hover .login-required-tooltip {
    opacity: 1;
}

/* Forgot Password Link */
.text-right {
    text-align: right;
}

.forgot-password {
    color: #3498db;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
}

.forgot-password:hover {
    color: #2980b9;
    text-decoration: underline;
}
