:root {
    --primary-color: #0088cc;
    /* Telegram-like blue */
    --secondary-color: #ff6b6b;
    /* Playful pink/red */
    --accent-yellow: #feca57;
    --accent-green: #1dd1a1;
    --bg-gradient-start: #e0c3fc;
    --bg-gradient-end: #8ec5fc;
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.4);
    --text-main: #333;
    --text-light: #666;
    --card-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--text-main);
    background: linear-gradient(135deg, var(--bg-gradient-start) 0%, var(--bg-gradient-end) 100%);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

h1,
h2,
h3,
.logo span {
    font-family: 'Fredoka', sans-serif;
    /* Playful font for headings */
}

/* Background Shapes */
.background-shapes .shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    z-index: -1;
    animation: float 20s infinite;
}

.shape-1 {
    width: 400px;
    height: 400px;
    background: var(--secondary-color);
    top: -100px;
    left: -100px;
    opacity: 0.4;
}

.shape-2 {
    width: 500px;
    height: 500px;
    background: var(--primary-color);
    bottom: -150px;
    right: -150px;
    opacity: 0.4;
    animation-delay: -5s;
}

.shape-3 {
    width: 300px;
    height: 300px;
    background: var(--accent-yellow);
    top: 40%;
    left: 40%;
    opacity: 0.3;
    animation-delay: -10s;
}

@keyframes float {
    0% {
        transform: translate(0, 0) rotate(0deg);
    }

    33% {
        transform: translate(30px, -50px) rotate(10deg);
    }

    66% {
        transform: translate(-20px, 20px) rotate(-5deg);
    }

    100% {
        transform: translate(0, 0) rotate(0deg);
    }
}

/* Layout Utility */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
header {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 15px 0;
}

.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: 700;
    color: var(--primary-color);
}

.logo-img {
    height: 40px;
    width: auto;
    border-radius: 10px;
}

nav ul {
    display: flex;
    gap: 30px;
    list-style: none;
}

nav a {
    text-decoration: none;
    color: var(--text-main);
    font-weight: 500;
    transition: color 0.3s;
}

nav a:hover {
    color: var(--primary-color);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 24px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    border: none;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 4px 15px rgba(0, 136, 204, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 136, 204, 0.4);
    background: #0099e6;
}

.btn-large {
    padding: 16px 32px;
    font-size: 1.2rem;
}

/* Hero Section */
.hero {
    padding: 80px 0;
    display: flex;
    align-items: center;
}

.hero-content {
    display: flex;
    align-items: center;
    gap: 50px;
    width: 100%;
}

.hero-text {
    flex: 1;
}

.hero-text h1 {
    font-size: 3.5rem;
    line-height: 1.2;
    margin-bottom: 20px;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-light);
    margin-bottom: 40px;
    line-height: 1.6;
}

.hero-image {
    flex: 1;
    display: flex;
    justify-content: center;
}

.phone-frame {
    background: #fff;
    padding: 10px;
    border-radius: 30px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
    max-width: 350px;
    transform: rotate(-3deg);
    transition: transform 0.5s;
}

.phone-frame:hover {
    transform: rotate(0deg) scale(1.02);
}

.phone-frame img {
    width: 100%;
    border-radius: 20px;
    display: block;
}

.requirements {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-top: 10px;
}

.portable-version {
    margin-top: 20px;
    background: rgba(255, 255, 255, 0.4);
    padding: 15px;
    border-radius: 15px;
    border: 1px dashed var(--primary-color);
}

.portable-link {
    color: var(--primary-color);
    font-weight: 700;
    text-decoration: none;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 5px;
}

.portable-link:hover {
    text-decoration: underline;
}

.portable-desc {
    font-size: 0.9rem;
    color: var(--text-main);
    margin-bottom: 5px;
}

.portable-instruction {
    font-size: 0.85rem;
    color: var(--text-light);
    font-style: italic;
    background: rgba(255, 255, 255, 0.5);
    padding: 5px;
    border-radius: 5px;
    display: inline-block;
}

.version-tag {
    background: rgba(255, 255, 255, 0.2);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.8em;
    margin-left: 8px;
}

/* Features Section */
.features {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 50px;
    color: var(--text-main);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.feature-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    padding: 30px;
    border-radius: 20px;
    text-align: center;
    transition: transform 0.3s;
    backdrop-filter: blur(5px);
}

.feature-card:hover {
    transform: translateY(-10px);
    background: rgba(255, 255, 255, 0.85);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 20px;
}

.feature-card h3 {
    margin-bottom: 15px;
    color: var(--text-main);
}

.feature-card p {
    color: var(--text-light);
    line-height: 1.5;
}

.future-feature {
    border: 2px dashed var(--primary-color);
    background: rgba(255, 255, 255, 0.5);
}

/* Certificate Guide */
.certificate-section {
    padding: 80px 0;
    background: #fff;
    border-top: 1px solid var(--glass-border);
}

.cert-explanation {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 50px;
}

.cert-explanation p {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 30px;
}

.btn-accent {
    background: var(--secondary-color);
    color: white;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
}

.btn-accent:hover {
    background: #ff5252;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.4);
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.step-card {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 30px 20px;
    text-align: center;
    border: 1px solid #eee;
    transition: transform 0.3s, box-shadow 0.3s;
}

.step-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.step-num {
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2rem;
    margin: 0 auto 20px;
}

.step-card p {
    color: var(--text-main);
    line-height: 1.5;
}

.step-card strong {
    color: var(--primary-color);
}

.final-install {
    text-align: center;
    padding: 40px;
    background: var(--glass-bg);
    border-radius: 20px;
    border: 1px solid var(--glass-border);
}

.final-install p {
    font-size: 1.2rem;
    margin-bottom: 30px;
}

/* Updated Buttons */
.download-options {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: flex-start;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: white;
}

/* Showcase / Gallery */
.showcase {
    padding: 60px 0;
}

.gallery-grid {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
}

.gallery-item {
    background: #fff;
    padding: 10px;
    border-radius: 16px;
    box-shadow: var(--card-shadow);
    max-width: 500px;
    width: 100%;
}

.gallery-item img {
    width: 100%;
    border-radius: 10px;
    display: block;
}

.caption {
    text-align: center;
    padding: 10px 0 5px;
    font-weight: 500;
    color: var(--text-light);
}

/* Installation Steps */
.installation {
    padding: 80px 0;
    background: rgba(255, 255, 255, 0.3);
}

.steps {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
    margin-bottom: 40px;
}

.step {
    flex: 1;
    min-width: 250px;
    max-width: 300px;
    text-align: center;
    position: relative;
}

.step-number {
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    margin: 0 auto 20px;
}

.note {
    text-align: center;
    background: #fff3cd;
    color: #856404;
    padding: 15px;
    border-radius: 10px;
    max-width: 600px;
    margin: 0 auto;
}

/* Footer */
footer {
    background: #333;
    color: #fff;
    padding: 40px 0;
    margin-top: 50px;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    text-align: center;
}

.footer-logo {
    font-family: 'Fredoka', sans-serif;
    font-size: 2rem;
    color: var(--secondary-color);
}

.footer-links {
    display: flex;
    gap: 20px;
}

.footer-links a {
    color: #ccc;
    text-decoration: none;
    font-size: 0.9rem;
}

.footer-links a:hover {
    color: #fff;
}

.copyright {
    color: #777;
    font-size: 0.8rem;
    margin-top: 10px;
}

/* Responsive */
@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        gap: 15px;
    }

    .hero-content {
        flex-direction: column-reverse;
        text-align: center;
    }

    .hero-text h1 {
        font-size: 2.5rem;
    }

    .hero-buttons {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
}

/* New Hero Layout - Steps & Design Match */
.install-steps {
    display: flex;
    flex-direction: column;
    gap: 30px;
    margin-bottom: 30px;
}

.step-row {
    display: flex;
    align-items: center;
    gap: 20px;
}

.step-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
}

.step-video {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 120px;
}

.step-label {
    color: var(--primary-color);
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.step-buttons {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Red Button */
.btn-red {
    background: #ff6b6b;
    color: white;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
}

.btn-red:hover {
    background: #ff5252;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.4);
}

/* Video Button & Labels */
.video-btn {
    margin-top: 5px;
    text-align: center;
    line-height: 1.2;
}

/* Adjust Step 2 Video Alignment */
.step-row:nth-child(2) .step-video {
    transform: translateY(-15px);
}

/* Card Frame (New Image Style) */
.card-frame {
    background: #fff;
    padding: 10px;
    border-radius: 30px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
    max-width: 380px;
    transform: rotate(3deg);
    /* Tilted right */
    transition: transform 0.5s;
}

.card-frame:hover {
    transform: rotate(0deg) scale(1.02);
}

.card-img {
    width: 100%;
    border-radius: 20px;
    display: block;
}

/* Adjustments */
.btn-sm {
    padding: 8px 16px;
    font-size: 0.9rem;
}

/* Video Buttons */
.video-buttons {
    display: flex;
    gap: 15px;
    margin-top: 10px;
    align-items: center;
}

.video-btn {
    width: 60px;
    height: 60px;
    cursor: pointer;
    transition: transform 0.2s, filter 0.2s;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.video-btn:hover {
    transform: scale(1.1);
    filter: brightness(1.1);
}


/* Floating Video Player */
.floating-player {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 30vw;
    min-width: 300px;
    background: #000;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    z-index: 1000;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border: 1px solid #333;
    transition: width 0.3s ease, height 0.3s ease, top 0.3s ease, left 0.3s ease;
    resize: both;
    /* Allow native resizing if supported/wanted, but we will impl custom drag/resize */
}

.floating-player.hidden {
    display: none !important;
}

.floating-player.maximized {
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    border-radius: 0;
    bottom: auto;
    right: auto;
}

.player-header {
    background: #222;
    padding: 8px 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: grab;
    user-select: none;
    border-bottom: 1px solid #444;
}

.player-header:active {
    cursor: grabbing;
}

.drag-handle {
    color: #fff;
    font-size: 0.9rem;
    font-weight: 600;
}

.window-controls {
    display: flex;
    gap: 8px;
}

.control-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: #ccc;
    font-size: 1rem;
    padding: 0 4px;
}

.control-btn:hover {
    color: #fff;
}

.video-wrapper {
    flex: 1;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    width: 100%;
    height: 100%;
}

video {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.custom-controls {
    background: #222;
    padding: 10px;
    display: flex;
    align-items: center;
    gap: 15px;
    border-top: 1px solid #444;
}

.media-btn {
    background: transparent;
    border: none;
    padding: 0;
    cursor: pointer;
    transition: transform 0.1s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.media-btn img {
    width: 35px;
    height: 35px;
    display: block;
}

.media-btn:hover {
    background: transparent;
    transform: scale(1.1);
}

/* Remove old specific colors since we use images now */
#ctrl-stop {
    background: transparent;
}

#ctrl-stop:hover {
    background: transparent;
}

#seek-bar {
    flex: 1;
    cursor: pointer;
}

/* Resize Handle (Custom) */
.resize-handle {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 15px;
    height: 15px;
    cursor: se-resize;
    z-index: 1002;
    background: linear-gradient(135deg, transparent 50%, #666 50%);
}