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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: #faf1e2;
    color: #050606;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding-top: 80px; /* Space for fixed header */
}

/* Header - Fixed/Sticky */
header {
    background-color: #faf1e2;
    padding: 15px 0;
    border-bottom: 1px solid #e5d9c3;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.logo {
    font-size: 24px;
    font-weight: bold;
    color: #050606;
    text-decoration: none;
    white-space: nowrap;
}

/* Navigation */
nav {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

nav a {
    color: #050606;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 5px;
    transition: background-color 0.3s;
    white-space: nowrap;
    font-size: 14px;
}

nav a:hover {
    background-color: #e5d9c3;
}

/* Hamburger Menu Button (Mobile) */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    flex-direction: column;
    gap: 4px;
}

.menu-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: #050606;
    border-radius: 2px;
    transition: all 0.3s;
}

/* Language Selector */
.language-selector {
    display: inline-block;
    margin-left: 10px;
}

.language-selector select {
    padding: 5px 10px;
    border-radius: 5px;
    border: 1px solid #d4c5a8;
    background-color: #faf1e2;
    color: #050606;
    cursor: pointer;
    font-size: 14px;
}

/* Main Content */
main {
    flex: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    width: 100%;
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 60px 0;
}

.hero h1 {
    font-size: 48px;
    margin-bottom: 20px;
    color: #050606;
}

.hero .slogan {
    font-size: 24px;
    font-weight: bold;
    color: #050606;
    margin-bottom: 40px;
}

/* Section */
.section {
    margin: 60px 0;
}

.section h2 {
    font-size: 36px;
    margin-bottom: 30px;
    color: #050606;
    text-align: center;
}

.section p {
    font-size: 18px;
    margin-bottom: 20px;
    text-align: center;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* Three Boxes / Four Boxes */
.three-boxes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 40px 0;
}

.box {
    background-color: #e5d9c3;
    padding: 30px;
    border-radius: 5px;
    text-align: center;
}

.box h3 {
    font-size: 24px;
    margin-bottom: 15px;
    color: #050606;
}

.box p {
    font-size: 16px;
    color: #050606;
    text-align: left;
}

/* Forms */
.form-container {
    max-width: 600px;
    margin: 40px auto;
    background-color: #e5d9c3;
    padding: 40px;
    border-radius: 5px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #050606;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #050606;
    border-radius: 5px;
    background-color: #faf1e2;
    color: #050606;
    font-size: 16px;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #050606;
    box-shadow: 0 0 0 2px rgba(5, 6, 6, 0.2);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.btn {
    background-color: #050606;
    color: #faf1e2;
    padding: 12px 30px;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s;
    width: 100%;
}

.btn:hover {
    background-color: #333;
}

.btn-secondary {
    background-color: #e5d9c3;
    color: #050606;
}

.btn-secondary:hover {
    background-color: #d4c5a8;
}

/* Alerts */
.alert {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 5px;
    border: 1px solid;
}

.alert-success {
    background-color: #d4edda;
    border-color: #c3e6cb;
    color: #155724;
}

.alert-error {
    background-color: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
}

.alert-info {
    background-color: #d1ecf1;
    border-color: #bee5eb;
    color: #0c5460;
}

/* Footer */
footer {
    background-color: #e5d9c3;
    padding: 40px 20px;
    margin-top: 60px;
    border-top: 1px solid #d4c5a8;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
}

.footer-section h3 {
    font-size: 18px;
    margin-bottom: 15px;
    color: #050606;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section a {
    color: #050606;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section a:hover {
    color: #333;
    text-decoration: underline;
}

.footer-bottom {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #d4c5a8;
}

.footer-bottom p {
    color: #050606;
    font-size: 14px;
}

/* Steps */
.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin: 40px 0;
}

.step {
    background-color: #e5d9c3;
    padding: 30px;
    border-radius: 5px;
}

.step h3 {
    font-size: 20px;
    margin-bottom: 15px;
    color: #050606;
}

.step p {
    font-size: 16px;
    color: #050606;
    text-align: left;
}

/* Table Styles */
table {
    width: 100%;
    border-collapse: collapse;
    background-color: #e5d9c3;
    border-radius: 5px;
    overflow: hidden;
}

.table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

table th,
table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #d4c5a8;
}

table thead {
    background-color: #d4c5a8;
}

table thead th {
    border-bottom: 2px solid #050606;
    font-weight: bold;
    color: #050606;
    white-space: nowrap;
}

table tbody tr:last-child td {
    border-bottom: none;
}

table tbody tr:hover {
    background-color: #d4c5a8;
}

/* Code Count Badge */
.code-count {
    background-color: #e5d9c3;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 14px;
    margin-left: 10px;
    display: inline-block;
}

/* Status Badge */
.status-badge {
    background-color: #28a745;
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 12px;
    display: inline-block;
}

/* Account Links */
.account-links {
    text-align: center;
    margin-top: 40px;
}

.account-links a {
    color: #050606;
    text-decoration: underline;
    margin: 0 10px;
}

.account-links a.delete-link {
    color: #721c24;
}

/* Location Button */
.location-btn {
    background-color: #050606;
    color: #faf1e2;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    font-size: 14px;
    cursor: pointer;
    margin-top: 10px;
    transition: background-color 0.3s;
}

.location-btn:hover {
    background-color: #333;
}

.location-btn:disabled {
    background-color: #999;
    cursor: not-allowed;
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        padding-top: 70px;
    }
    
    header {
        padding: 10px 0;
    }
    
    .header-container {
        flex-direction: row;
        justify-content: space-between;
    }
    
    .menu-toggle {
        display: flex;
    }
    
    nav {
        display: none;
        width: 100%;
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
        margin-top: 15px;
        padding-top: 15px;
        border-top: 1px solid #e5d9c3;
    }
    
    nav.active {
        display: flex;
    }
    
    nav a {
        width: 100%;
        margin: 0;
        padding: 12px;
        text-align: left;
    }
    
    .language-selector {
        margin-left: 0;
        width: 100%;
        margin-top: 10px;
    }
    
    .language-selector select {
        width: 100%;
    }
    
    .hero h1 {
        font-size: 32px;
    }
    
    .hero .slogan {
        font-size: 18px;
    }
    
    .section h2 {
        font-size: 28px;
    }
    
    .section p {
        font-size: 16px;
    }
    
    .three-boxes {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .system-boxes {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .steps {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .form-container {
        padding: 20px;
        margin: 20px 10px;
    }
    
    .footer-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    main {
        padding: 20px 10px;
    }
    
    .section {
        margin: 40px 0;
    }
}

@media (max-width: 480px) {
    body {
        padding-top: 60px;
    }
    
    .logo {
        font-size: 20px;
    }
    
    .hero h1 {
        font-size: 28px;
    }
    
    .hero .slogan {
        font-size: 16px;
    }
    
    .section h2 {
        font-size: 24px;
    }
    
    .box h3,
    .step h3 {
        font-size: 18px;
    }
    
    .box p,
    .step p {
        font-size: 14px;
    }
    
    .form-container {
        padding: 15px;
    }
    
    .btn {
        padding: 10px 20px;
        font-size: 14px;
    }
    
    table th,
    table td {
        padding: 10px;
        font-size: 14px;
    }
}
