/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    background-color: #f4f4f9;
    color: #333;
    padding-top: 80px; /* Space for the fixed header */
    padding-bottom: 60px; /* Ensure space for bottom buttons */
    height: 0vh;
}

a {
    text-decoration: none;
    color: #e74c3c; /* Default link color */
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
}

/* Header styling */
.main-header {
    background-color: #2c3e50;
    padding: 20px 0;
    color: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: fixed; /* Fix the header at the top */
    top: 0;
    width: 100%;
    z-index: 1000; /* Ensure it stays above other content */
}

/* Logo centered */
.main-header .logo {
    font-size: 28px;
    font-weight: 700;
    color: #ecf0f1;
    text-align: center;
    flex: 1;
    left: 50px;
    display: flex;
}
.main-header .logo span {
    color: #e74c3c;
}

/* Nav container */
.main-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative; /* for absolute-positioned buttons */
}

/* Back arrow (first link) */
.main-nav > a:first-child {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: #ecf0f1;
    font-size: 28px;
    cursor: pointer;
    transition: color 0.3s;
}
.main-nav > a:first-child:hover {
    color: #e74c3c;
}

/* Home button at top-right */
.home-button {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: #ecf0f1;
    font-size: 28px;
    display: flex;
    align-items: center;
    transition: color 0.3s;
    right: 0%;
    display: flex;
}
.home-button:hover {
    color: #e74c3c;
}

/* Login section styling */
.login-section {
    background-color: #fff;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    margin: 80px auto; /* Center login section and add margin for header */
    max-width: 400px; /* Limit width for better focus */
    bottom: 30px;
}

.login-section h1 {
    text-align: center;
    margin-bottom: 20px;
    font-size: 24px;
    color: #2c3e50;
}

.login-section label {
    display: block;
    margin: 10px 0 5px;
    font-weight: bold;
}

.login-section input {
    width: 100%;
    padding: 10px;
    margin-bottom: 20px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
}

.login-section button {
    background-color: #e74c3c;
    color: #fff;
    padding: 10px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    width: 100%;
    font-size: 16px;
    transition: background-color 0.3s;
}

.login-section button:hover {
    background-color: #c0392b;
}
.success-message {
  background: #e0f4e9;
  border: 1px solid #3c763d;
  color: #3c763d;
  padding: 0.5em;
  margin-bottom: 1em;
  border-radius: 4px;
}

/* Bottom buttons styling */
.bottom-buttons {
    display: flex;
    justify-content: space-around;
    align-items: center;
    background-color: #2c3e50;
    padding: 15px 0;
    position: fixed;
    bottom: 0;
    width: 100%;
    box-shadow: 0 -2px 4px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

.bottom-button {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #ecf0f1;
    font-size: 14px;
    transition: color 0.3s;
}

.bottom-button i {
    font-size: 24px;
}

.bottom-button span {
    margin-top: 5px;
}

.bottom-button:hover {
    color: #e74c3c;
}

/* Loading overlay & spinner */
.loading {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}
.spinner {
    --uib-size: 40px;
    --uib-color: #e74c3c;
    --uib-speed: 1.3s;
    --uib-dot-size: 25%;
    position: relative;
    display: inline-block;
    height: var(--uib-size);
    width: var(--uib-size);
    animation: spin var(--uib-speed) infinite linear;
}
.spinner .dot {
    position: absolute;
    left: calc(50% - var(--uib-dot-size) / 2);
    width: var(--uib-dot-size);
    height: 100%;
}
.spinner .dot::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    padding-bottom: 100%;
    background-color: var(--uib-color);
    border-radius: 50%;
    transition: background-color 0.3s ease;
}
.spinner .dot:nth-child(1) {
    transform: rotate(120deg);
}
.spinner .dot:nth-child(1)::after {
    animation: wobble var(--uib-speed) infinite ease-in-out;
}
.spinner .dot:nth-child(2) {
    transform: rotate(-120deg);
}
.spinner .dot:nth-child(2)::after {
    animation: wobble var(--uib-speed) infinite ease-in-out;
}
.spinner .dot:nth-child(3)::after {
    animation: wobble var(--uib-speed) infinite ease-in-out;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
@keyframes wobble {
    0%, 100% { transform: translateY(0%); }
    50% { transform: translateY(65%); }
}

/* Error message */
.error-message {
    background-color: #f8d7da;
    color: #721c24;
    padding: 0.75rem;
    margin-bottom: 1rem;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
}
