* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2563eb;
    --secondary-color: #64748b;
    --accent-color: #f59e0b;
    --text-color: #1e293b;
    --text-light: #64748b;
    --bg-color: #ffffff;
    --bg-light: #f8fafc;
    --border-color: #e2e8f0;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    background: var(--bg-color);
    box-shadow: var(--shadow);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    transition: background 0.3s ease;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 20px;
}

.logo h1 {
    color: var(--primary-color);
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0.2rem;
}

.tagline {
    color: var(--text-light);
    font-size: 0.8rem;
    font-style: italic;
}

.nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav a:hover {
    color: var(--primary-color);
}

.nav a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.nav a:hover::after {
    width: 100%;
}

.burger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 4px;
}

.burger span {
    width: 25px;
    height: 3px;
    background: var(--text-color);
    transition: 0.3s;
}

/* Hero Section */
.hero {
    padding: 120px 0 80px;
    background: linear-gradient(135deg, var(--bg-light) 0%, #e0e7ff 100%);
    margin-top: 80px;
}

.hero .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-content h2 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--text-color);
    line-height: 1.2;
}

.hero-content p {
    font-size: 1.2rem;
    color: var(--text-light);
    margin-bottom: 2rem;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn {
    padding: 0.8rem 2rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: #1d4ed8;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    color: var(--text-color);
    border: 2px solid var(--border-color);
}

.btn-outline:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* Table Flip Animation */
.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
}

.table-flip {
    text-align: center;
    position: relative;
    height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.table {
    width: 200px;
    height: 120px;
    position: relative;
    transform-origin: center bottom;
    animation: tableFlip 6s ease-in-out infinite;
    margin-bottom: 1rem;
}

.table-top {
    width: 180px;
    height: 20px;
    background: #8b4513;
    border-radius: 10px;
    position: absolute;
    top: 20px;
    left: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.table-leg {
    width: 8px;
    height: 80px;
    background: #654321;
    position: absolute;
    top: 40px;
    border-radius: 4px;
}

.table-leg-1 { left: 20px; }
.table-leg-2 { right: 20px; }
.table-leg-3 { left: 20px; top: 100px; height: 20px; }
.table-leg-4 { right: 20px; top: 100px; height: 20px; }

.flip-text {
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--primary-color);
    opacity: 0;
    animation: flipTextShow 6s ease-in-out infinite;
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
}

@keyframes tableFlip {
    0%, 60% { 
        transform: rotate(0deg) translateY(0px);
    }
    70% { 
        transform: rotate(-15deg) translateY(-10px);
    }
    80% { 
        transform: rotate(160deg) translateY(-5px);
    }
    90%, 100% { 
        transform: rotate(180deg) translateY(0px);
    }
}

@keyframes flipTextShow {
    0%, 65% { 
        opacity: 0;
        transform: translateX(-50%) scale(0.8);
    }
    75% { 
        opacity: 1;
        transform: translateX(-50%) scale(1.1);
    }
    85%, 100% { 
        opacity: 1;
        transform: translateX(-50%) scale(1);
    }
}

/* About Section */
.about {
    padding: 80px 0;
    background: var(--bg-color);
}

.about h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--text-color);
}

.about-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 4rem;
    align-items: start;
}

.about-text p {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    color: var(--text-light);
}

.stats {
    display: grid;
    gap: 2rem;
}

.stat {
    text-align: center;
    padding: 2rem;
    background: var(--bg-light);
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.stat h3 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.stat p {
    color: var(--text-light);
    font-size: 0.9rem;
}

/* Services Section */
.services {
    padding: 80px 0;
    background: var(--bg-light);
}

.services h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--text-color);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.service-card {
    background: var(--bg-color);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.service-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.service-card h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.service-card p {
    color: var(--text-light);
    line-height: 1.6;
}

/* Pricing Section */
.pricing {
    padding: 80px 0;
    background: var(--bg-color);
}

.pricing h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.pricing-subtitle {
    text-align: center;
    color: var(--text-light);
    font-size: 1.1rem;
    margin-bottom: 3rem;
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.pricing-card {
    background: var(--bg-color);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.pricing-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.pricing-card.featured {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, var(--bg-color) 0%, #f0f9ff 100%);
}

.pricing-header h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.price {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.price span {
    font-size: 1rem;
    color: var(--text-light);
}

.badge {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent-color);
    color: white;
    padding: 0.3rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.features {
    list-style: none;
    margin: 2rem 0;
    text-align: left;
}

.features li {
    padding: 0.5rem 0;
    color: var(--text-light);
    border-bottom: 1px solid var(--border-color);
}

.features li:last-child {
    border-bottom: none;
}

.pricing-note {
    background: var(--bg-light);
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid var(--accent-color);
    margin-top: 2rem;
}

.pricing-note p {
    color: var(--text-light);
    font-style: italic;
}

/* Testimonials Section */
.testimonials {
    padding: 80px 0;
    background: var(--bg-light);
}

.testimonials h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--text-color);
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.testimonial {
    background: var(--bg-color);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    position: relative;
}

.testimonial::before {
    content: '"';
    position: absolute;
    top: -10px;
    left: 20px;
    font-size: 4rem;
    color: var(--primary-color);
    opacity: 0.3;
}

.testimonial p {
    font-style: italic;
    margin-bottom: 1rem;
    color: var(--text-light);
}

.author {
    font-weight: 600;
    color: var(--text-color);
}

/* Contact Section */
.contact {
    padding: 80px 0;
    background: var(--bg-color);
}

.contact h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.contact > p {
    text-align: center;
    color: var(--text-light);
    margin-bottom: 3rem;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.contact-info {
    display: grid;
    gap: 2rem;
}

.contact-item h3 {
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

.contact-item p {
    color: var(--text-light);
    line-height: 1.6;
}

.contact-form {
    display: grid;
    gap: 1rem;
}

.contact-form input,
.contact-form textarea {
    padding: 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.contact-form textarea {
    resize: vertical;
    min-height: 120px;
}

/* Footer */
.footer {
    background: var(--text-color);
    color: white;
    padding: 40px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3,
.footer-section h4 {
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.footer-section ul {
    list-style: none;
}

.footer-section li {
    margin-bottom: 0.5rem;
    color: #cbd5e1;
}

/* Telegram links styling */
.footer-section a,
.contact-item a {
    color: #2563eb;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section a:hover,
.contact-item a:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

/* Chat widget styles */
.chat-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    font-family: inherit;
}

.chat-toggle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #2563eb;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease;
    position: relative;
    user-select: none;
    outline: none;
    border: none;
}

.chat-toggle:hover {
    transform: scale(1.1);
}

.chat-toggle:active {
    transform: scale(0.95);
}

.chat-notification {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ef4444;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: block;
    animation: pulse 2s infinite;
    user-select: none;
    pointer-events: none;
}

.chat-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 300px;
    height: 400px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid #e2e8f0;
}

.chat-header {
    background: #2563eb;
    color: white;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
}

.chat-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease;
}

.chat-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.chat-messages {
    flex: 1;
    padding: 1rem;
    overflow-y: auto;
    background: #f8fafc;
}

.chat-message {
    margin-bottom: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 18px;
    max-width: 80%;
    word-wrap: break-word;
    animation: fadeInUp 0.3s ease;
}

.chat-message.bot {
    background: white;
    margin-right: auto;
    border-bottom-left-radius: 4px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.chat-message.user {
    background: #2563eb;
    color: white;
    margin-left: auto;
    border-bottom-right-radius: 4px;
}

.chat-message.bot::before {
    content: '🤖';
    margin-right: 0.5rem;
}

.chat-message.user::after {
    content: '👤';
    margin-left: 0.5rem;
}

.chat-input {
    display: flex;
    padding: 1rem;
    border-top: 1px solid #e2e8f0;
    background: white;
    gap: 0.5rem;
}

.chat-input input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.3s ease;
}

.chat-input input:focus {
    border-color: #2563eb;
}

.chat-input button {
    background: #2563eb;
    color: white;
    border: none;
    padding: 0.75rem 1rem;
    border-radius: 20px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s ease;
    min-width: 50px;
}

.chat-input button:hover {
    background: #1d4ed8;
}

.chat-input button:disabled {
    background: #94a3b8;
    cursor: not-allowed;
}

/* Modal styles */
.modal-content {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    transform: scale(0.8);
    transition: transform 0.3s ease;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e2e8f0;
}

.modal-header h3 {
    margin: 0;
    color: var(--text-color);
    font-size: 1.5rem;
}

.close-modal {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #64748b;
    padding: 0.5rem;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.close-modal:hover {
    background: #f1f5f9;
    color: #1e293b;
    transform: scale(1.1);
}

.modal-body ul {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.modal-body li {
    margin-bottom: 0.5rem;
    color: var(--text-light);
}

.service-price {
    background: #f8fafc;
    padding: 1rem;
    border-radius: 8px;
    margin: 1rem 0;
    text-align: center;
    font-size: 1.1rem;
    border: 1px solid #e2e8f0;
}

.modal-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.checkout-form {
    display: grid;
    gap: 1rem;
    margin-top: 1rem;
}

.checkout-form input,
.checkout-form select,
.checkout-form textarea {
    padding: 0.8rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.checkout-form input:focus,
.checkout-form select:focus,
.checkout-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.checkout-form textarea {
    resize: vertical;
    min-height: 100px;
}

/* Error message styles */
.error-message {
    color: #ef4444;
    font-size: 0.8rem;
    margin-top: 0.25rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.error-message::before {
    content: '⚠️';
    font-size: 0.7rem;
}

/* Success styles */
.success-message {
    color: #10b981;
    font-size: 0.8rem;
    margin-top: 0.25rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.success-message::before {
    content: '✅';
    font-size: 0.7rem;
}

/* Notification styles */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 1rem 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 10000;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    max-width: 350px;
    word-wrap: break-word;
    font-weight: 500;
}

.notification.success {
    background: #10b981;
    color: white;
}

.notification.error {
    background: #ef4444;
    color: white;
}

.notification.show {
    transform: translateX(0);
}

/* Responsive modal styles */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        padding: 1.5rem;
        max-height: 90vh;
    }
    
    .modal-actions {
        flex-direction: column;
    }
    
    .modal-actions .btn {
        width: 100%;
    }
    
    .notification {
        max-width: 300px;
        top: 10px;
        right: 10px;
        left: 10px;
        transform: translateY(-100%);
    }
    
    .notification.show {
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav {
        display: none;
    }
    
    .nav.active {
        display: block;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--bg-color);
        box-shadow: var(--shadow);
        padding: 1rem;
    }
    
    .nav.active ul {
        flex-direction: column;
        gap: 1rem;
    }
    
    .burger {
        display: flex;
    }
    
    .burger.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    
    .burger.active span:nth-child(2) {
        opacity: 0;
    }
    
    .burger.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }
    
    .hero .container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-content h2 {
        font-size: 2rem;
    }
    
    .about-content {
        grid-template-columns: 1fr;
    }
    
    .contact-content {
        grid-template-columns: 1fr;
    }
    
    .cta-buttons {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .hero-content h2 {
        font-size: 1.8rem;
    }
    
    .hero-content p {
        font-size: 1rem;
    }
    
    .services-grid,
    .pricing-grid,
    .testimonials-grid {
        grid-template-columns: 1fr;
    }
    
    .table {
        width: 150px;
        height: 90px;
    }
    
    .table-flip {
        height: 150px;
    }
    
    .table-top {
        width: 135px;
        height: 15px;
        left: 7px;
    }
    
    .flip-text {
        font-size: 1.2rem;
    }
}

/* Chat widget responsive styles */
@media (max-width: 480px) {
    .chat-window {
        width: 280px;
        height: 350px;
        bottom: 70px;
    }
    
    .chat-toggle {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
    
    .chat-notification {
        width: 18px;
        height: 18px;
        font-size: 0.7rem;
        top: -4px;
        right: -4px;
    }
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Loading animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.service-card,
.pricing-card,
.testimonial {
    animation: fadeInUp 0.6s ease-out;
}

/* Hover effects */
.service-card:hover .service-icon {
    transform: scale(1.1);
    transition: transform 0.3s ease;
}

.pricing-card:hover .price {
    transform: scale(1.05);
    transition: transform 0.3s ease;
}

/* Pulse animation for chat notification */
@keyframes pulse {
    0%, 100% { 
        transform: scale(1);
        opacity: 1;
    }
    50% { 
        transform: scale(1.2);
        opacity: 0.8;
    }
}
