/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Styles */
.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: 600;
}

.logo i {
    font-size: 1.8rem;
    color: #ffd700;
}

/* Language Selector */
.language-selector {
    position: relative;
}

.lang-btn {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: white;
    padding: 8px 16px;
    border-radius: 25px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.lang-btn:hover {
    background: rgba(255,255,255,0.2);
    transform: translateY(-1px);
}

.lang-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
    min-width: 150px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1001;
}

.lang-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lang-dropdown a {
    display: block;
    padding: 12px 16px;
    color: #333;
    text-decoration: none;
    transition: background-color 0.2s ease;
}

.lang-dropdown a:hover {
    background-color: #f8f9fa;
}

.lang-dropdown a:first-child {
    border-radius: 8px 8px 0 0;
}

.lang-dropdown a:last-child {
    border-radius: 0 0 8px 8px;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 80px 0;
    text-align: center;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.hero-subtitle {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    line-height: 1.8;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    border: none;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-primary {
    background: linear-gradient(45deg, #ff6b6b, #ee5a24);
    color: white;
    box-shadow: 0 4px 15px rgba(255,107,107,0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255,107,107,0.6);
}

/* Tools Section */
.tools-section {
    padding: 80px 0;
    background: white;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 3rem;
    color: #2c3e50;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(45deg, #667eea, #764ba2);
    border-radius: 2px;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.tool-card {
    background: white;
    border-radius: 15px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 5px 25px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    border: 1px solid #f0f0f0;
    position: relative;
    overflow: hidden;
}

.tool-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(45deg, #667eea, #764ba2);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.tool-card:hover::before {
    transform: scaleX(1);
}

.tool-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
}

.tool-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
    box-shadow: 0 5px 15px rgba(102,126,234,0.3);
}

.tool-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: #2c3e50;
}

.tool-description {
    color: #666;
    margin-bottom: 25px;
    line-height: 1.6;
}

.tool-link {
    display: inline-block;
    padding: 10px 25px;
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 600;
    transition: all 0.3s ease;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
}

.tool-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102,126,234,0.4);
}

/* Footer */
.footer {
    background: #2c3e50;
    color: white;
    padding: 50px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 30px;
}

.footer-section h4 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: #ecf0f1;
}

.footer-section p {
    color: #bdc3c7;
    line-height: 1.6;
}

.footer-links {
    list-style: none;
}

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

.footer-links a {
    color: #bdc3c7;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #3498db;
}

.footer-bottom {
    border-top: 1px solid #34495e;
    padding-top: 20px;
    text-align: center;
    color: #95a5a6;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header .container {
        flex-direction: column;
        gap: 15px;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .tools-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .tool-card {
        padding: 20px;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .hero {
        padding: 60px 0;
    }
    
    .hero-title {
        font-size: 1.8rem;
    }
    
    .tools-section {
        padding: 60px 0;
    }
    
    .tool-card {
        padding: 15px;
    }
    
    .tool-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
}

/* Animation Classes */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.6s ease forwards;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.slide-in-left {
    opacity: 0;
    transform: translateX(-50px);
    animation: slideInLeft 0.6s ease forwards;
}

@keyframes slideInLeft {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.slide-in-right {
    opacity: 0;
    transform: translateX(50px);
    animation: slideInRight 0.6s ease forwards;
}

@keyframes slideInRight {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Table Creator specific styles */
.table-creator-controls {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid #e9ecef;
}

.table-creator-controls .row {
    align-items: end;
}

.table-creator-controls .form-group {
    margin-bottom: 15px;
}

.table-creator-controls label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 5px;
    display: block;
}

.table-creator-controls input[type="number"] {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 14px;
}

.table-creator-controls .btn {
    margin: 2px;
    padding: 8px 16px;
    font-size: 14px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.table-creator-controls .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.table-options {
    background: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.table-options h4 {
    color: #495057;
    margin-bottom: 15px;
    font-size: 18px;
    font-weight: 600;
}

.table-options .form-check {
    margin-bottom: 10px;
}

.table-options .form-check-input {
    margin-right: 8px;
}

.table-options .form-check-label {
    color: #6c757d;
    font-weight: 500;
}

.table-options select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    background-color: white;
    font-size: 14px;
}

#table-container {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    overflow-x: auto;
}

#created-table {
    width: 100%;
    margin: 0;
    font-size: 14px;
}

#created-table th,
#created-table td {
    padding: 12px;
    text-align: left;
    border: 1px solid #dee2e6;
    min-width: 120px;
    position: relative;
}

#created-table th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #495057;
}

#created-table td {
    background-color: white;
}

#created-table th:focus,
#created-table td:focus {
    outline: 2px solid #007bff;
    outline-offset: -2px;
    background-color: #e3f2fd;
}

#created-table.table-striped tbody tr:nth-of-type(odd) td {
    background-color: #f8f9fa;
}

#created-table.table-dark {
    background-color: #343a40;
    color: white;
}

#created-table.table-dark th {
    background-color: #495057;
    color: white;
    border-color: #495057;
}

#created-table.table-dark td {
    background-color: #343a40;
    color: white;
    border-color: #495057;
}

#created-table.table-dark.table-striped tbody tr:nth-of-type(odd) td {
    background-color: #3d444a;
}

#created-table.table-primary th {
    background-color: #007bff;
    color: white;
    border-color: #007bff;
}

#created-table.table-primary td {
    border-color: #b3d7ff;
}

#created-table.table-success th {
    background-color: #28a745;
    color: white;
    border-color: #28a745;
}

#created-table.table-success td {
    border-color: #b3e5c2;
}

/* Responsive design for table creator */
@media (max-width: 768px) {
    .table-creator-controls .col-md-2,
    .table-creator-controls .col-md-3,
    .table-creator-controls .col-md-4 {
        margin-bottom: 10px;
    }
    
    .table-creator-controls .btn {
        width: 100%;
        margin-bottom: 5px;
    }
    
    #created-table th,
    #created-table td {
        min-width: 100px;
        padding: 8px;
        font-size: 12px;
    }
}

/* Animation for table creation */
@keyframes tableSlideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#created-table {
    animation: tableSlideIn 0.3s ease-out;
}

/* Hover effects for editable cells */
#created-table th[contenteditable="true"]:hover,
#created-table td[contenteditable="true"]:hover {
    background-color: #f0f8ff;
    cursor: text;
}

#created-table.table-dark th[contenteditable="true"]:hover,
#created-table.table-dark td[contenteditable="true"]:hover {
    background-color: #495057;
}

/* Button group styling */
.btn-group-custom {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.btn-group-custom .btn {
    flex: 1;
    min-width: 120px;
}

@media (max-width: 576px) {
    .btn-group-custom .btn {
        min-width: 100%;
    }
}