/* download.css - Dedicated Styles for Download Page */

/* Variables */
:root {
    --primary-color: #ff4655;
    --secondary-color: #0d1117;
    --bg-dark: #0a0e14;
    --bg-card: #161b22;
    --text-color: #e6edf3;
    --text-secondary: #8b949e;
    --success-color: #2ea043;
    --warning-color: #d29922;
    --danger-color: #f85149;
    --font-heading: 'Orbitron', sans-serif;
    --font-body: 'Exo 2', sans-serif;
}

/* Page Header */
.download-header {
    padding: 120px 0 80px;
    text-align: center;
    background: linear-gradient(rgba(10, 14, 20, 0.95), rgba(10, 14, 20, 0.95)), url('../images/download-bg.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    position: relative;
    overflow: hidden;
}

.download-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 20%, rgba(255, 70, 85, 0.1) 0%, transparent 50%);
}

.page-title {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 2px;
    background: linear-gradient(90deg, #fff, var(--primary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
    from { text-shadow: 0 0 10px rgba(255, 70, 85, 0.5); }
    to { text-shadow: 0 0 20px rgba(255, 70, 85, 0.8), 0 0 30px rgba(255, 70, 85, 0.6); }
}

.page-subtitle {
    font-size: 1.3rem;
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto 40px;
    font-weight: 300;
}

/* Download Stats */
.download-stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-top: 50px;
    flex-wrap: wrap;
}

.stat-item {
    text-align: center;
    padding: 20px 30px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 70, 85, 0.2);
    transition: transform 0.3s, border-color 0.3s;
    min-width: 180px;
}

.stat-item:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
}

.stat-item i {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 15px;
    display: block;
}

.stat-count {
    display: block;
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Platform Selection */
.platform-selection {
    padding: 60px 0 40px;
    background-color: var(--bg-dark);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.section-title {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 15px;
    color: var(--text-color);
}

.section-subtitle {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 40px;
    font-size: 1.1rem;
}

.selection-tabs {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    max-width: 1200px;
    margin: 0 auto;
}

.tab-btn {
    background: linear-gradient(135deg, var(--bg-card) 0%, #1c2129 100%);
    color: var(--text-color);
    border: 2px solid rgba(255, 70, 85, 0.3);
    padding: 15px 30px;
    border-radius: 12px;
    font-family: var(--font-body);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 16px;
    position: relative;
    overflow: hidden;
}

.tab-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 70, 85, 0.2), transparent);
    transition: left 0.5s;
}

.tab-btn:hover::before {
    left: 100%;
}

.tab-btn:hover {
    background: linear-gradient(135deg, rgba(255, 70, 85, 0.1) 0%, rgba(255, 70, 85, 0.05) 100%);
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.tab-btn.active {
    background: linear-gradient(135deg, var(--primary-color) 0%, #ff2e3f 100%);
    border-color: var(--primary-color);
    color: white;
    box-shadow: 0 0 20px rgba(255, 70, 85, 0.5);
}

.tab-btn i {
    font-size: 20px;
}

/* Download Content */
.download-content {
    padding: 60px 0;
    background-color: var(--bg-dark);
    min-height: 600px;
}

.platform-content {
    display: none;
    animation: fadeIn 0.5s ease-out;
}

.platform-content.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.platform-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 20px;
}

.platform-title {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    margin: 0;
    color: var(--text-color);
}

.platform-status {
    display: flex;
    align-items: center;
    gap: 15px;
}

.status-badge {
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-online {
    background: rgba(46, 160, 67, 0.2);
    color: var(--success-color);
    border: 1px solid rgba(46, 160, 67, 0.3);
}

.last-updated {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.platform-desc {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 50px;
    max-width: 800px;
    line-height: 1.6;
}

/* Download Grid */
.download-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 60px;
}

.download-card {
    background: linear-gradient(145deg, var(--bg-card) 0%, #1a2029 100%);
    border-radius: 20px;
    padding: 30px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.download-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
}

.download-card:hover {
    transform: translateY(-10px);
    border-color: rgba(255, 70, 85, 0.4);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 25px;
}

.download-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    color: white;
    transition: transform 0.3s;
}

.download-card:hover .download-icon {
    transform: scale(1.1) rotate(5deg);
}

.file-type-indicator {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: white;
}

.file-type-exe { background: linear-gradient(135deg, #0078d7, #005a9e); }
.file-type-dll { background: linear-gradient(135deg, #4ecdc4, #2a9d8f); }
.file-type-zip { background: linear-gradient(135deg, #ff6b6b, #ee5a52); }
.file-type-driver { background: linear-gradient(135deg, #45b7d1, #34a0a4); }

.download-card h3 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--text-color);
    line-height: 1.3;
}

.download-card p {
    color: var(--text-secondary);
    margin-bottom: 25px;
    line-height: 1.5;
    flex-grow: 1;
}

.download-info {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 25px;
}

.download-size, .download-version, .download-date {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-secondary);
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.download-size i, .download-version i, .download-date i {
    color: var(--primary-color);
    width: 20px;
}

.download-btns {
    margin-top: auto;
}

.download-btns .btn-primary {
    width: 100%;
    margin-bottom: 20px;
    padding: 15px;
    font-size: 1rem;
    border-radius: 12px;
}

.alt-links {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.alt-links span {
    display: block;
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 12px;
    font-weight: 500;
}

.alt-links a {
    color: var(--primary-color);
    text-decoration: none;
    margin: 0 8px;
    font-size: 0.9rem;
    transition: all 0.3s;
    position: relative;
    font-weight: 500;
}

.alt-links a:hover {
    color: white;
    text-decoration: underline;
}

.alt-links a::after {
    content: '|';
    position: absolute;
    right: -12px;
    color: var(--text-secondary);
}

.alt-links a:last-child::after {
    display: none;
}

/* Download Notice */
.download-notice {
    background: linear-gradient(145deg, rgba(255, 70, 85, 0.1), rgba(255, 70, 85, 0.05));
    border-radius: 20px;
    padding: 35px;
    border: 1px solid rgba(255, 70, 85, 0.2);
    margin-top: 40px;
    backdrop-filter: blur(10px);
}

.download-notice h3 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 15px;
    color: var(--warning-color);
}

.download-notice h3 i {
    color: var(--warning-color);
}

.download-notice p {
    color: var(--text-secondary);
    margin-bottom: 15px;
    padding-left: 35px;
    position: relative;
    line-height: 1.6;
}

.download-notice p:last-child {
    margin-bottom: 0;
}

.download-notice p::before {
    content: '✓';
    position: absolute;
    left: 10px;
    color: var(--primary-color);
    font-weight: bold;
    font-size: 1.1rem;
}

.download-notice a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.download-notice a:hover {
    text-decoration: underline;
}

/* Download Tips */
.download-tips {
    padding: 80px 0;
    background: linear-gradient(rgba(10, 14, 20, 0.9), rgba(10, 14, 20, 0.9)), url('../images/pattern.png');
    background-size: 300px;
}

.download-tips h3 {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    margin-bottom: 40px;
    display: flex;
    align-items: center;
    gap: 15px;
    color: var(--primary-color);
}

.download-tips h3 i {
    color: var(--primary-color);
}

.tips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.tip-card {
    background: var(--bg-card);
    border-radius: 15px;
    padding: 30px;
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.tip-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 70, 85, 0.3);
}

.tip-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
    flex-shrink: 0;
}

.tip-content {
    flex: 1;
}

.tip-content h4 {
    font-size: 1.3rem;
    margin-bottom: 12px;
    color: var(--text-color);
    font-family: var(--font-body);
    font-weight: 600;
}

.tip-content p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Download Modal */
.download-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease-out;
}

.download-modal.active {
    opacity: 1;
    visibility: visible;
}

.download-modal .modal-content {
    background: linear-gradient(145deg, var(--bg-card) 0%, #1a2029 100%);
    border-radius: 25px;
    width: 90%;
    max-width: 500px;
    border: 2px solid var(--primary-color);
    overflow: hidden;
    transform: translateY(30px) scale(0.95);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.download-modal.active .modal-content {
    transform: translateY(0) scale(1);
}

/* Success Modal */
.success-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease-out;
}

.success-modal.active {
    opacity: 1;
    visibility: visible;
}

/* CTA Section */
.cta {
    padding: 100px 0;
    background: linear-gradient(135deg, rgba(255, 70, 85, 0.1) 0%, rgba(13, 17, 23, 0.9) 100%);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 70, 85, 0.1) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.cta-title {
    font-family: var(--font-heading);
    font-size: 3rem;
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}

.cta-text {
    font-size: 1.2rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 40px;
    position: relative;
    z-index: 1;
}

.cta-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}

/* Responsive Styles */
@media (max-width: 1200px) {
    .page-title { font-size: 3rem; }
    .platform-title { font-size: 2.2rem; }
    .download-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .page-title { font-size: 2.2rem; }
    .page-subtitle { font-size: 1.1rem; }
    .platform-title { font-size: 1.8rem; }
    .download-grid { grid-template-columns: 1fr; }
    .platform-header { flex-direction: column; align-items: flex-start; }
    .platform-status { align-self: flex-start; }
    .download-stats { gap: 20px; }
    .stat-item { min-width: 140px; padding: 15px 20px; }
    .stat-count { font-size: 1.5rem; }
    .selection-tabs { flex-direction: column; align-items: stretch; }
    .tab-btn { justify-content: center; }
    .tip-card { flex-direction: column; text-align: center; }
    .tip-icon { margin: 0 auto; }
    .cta-buttons { flex-direction: column; align-items: stretch; }
    .cta-title { font-size: 2.2rem; }
    .download-modal .modal-content { width: 95%; }
}

@media (max-width: 480px) {
    .page-title { font-size: 1.8rem; }
    .platform-title { font-size: 1.6rem; }
    .download-card { padding: 25px 20px; }
    .download-notice { padding: 25px 20px; }
    .download-notice p { padding-left: 25px; }
    .stat-item { min-width: 100%; }
    .cta-title { font-size: 1.8rem; }
}

/* ================= DOWNLOAD MODAL FIX ================= */

.download-modal{
    position:fixed;
    inset:0;
    background:rgba(0,0,0,.65);
    backdrop-filter:blur(6px);
    display:flex;
    align-items:center;
    justify-content:center;
    z-index:9999;
    opacity:0;
    transition:.25s ease;
}

.download-modal.active{
    opacity:1;
}

/* modal box */
.download-modal .modal-content{
    width:520px;
    max-width:95%;
    background:linear-gradient(180deg,#0f1621,#0b111a);
    border:1px solid rgba(255,70,85,.6);
    border-radius:16px;
    box-shadow:0 0 40px rgba(255,70,85,.25);
    overflow:hidden;
    display:flex;
    flex-direction:column;
}

/* header */
.modal-header{
    padding:14px 18px;
    display:flex;
    justify-content:space-between;
    align-items:center;
    border-bottom:1px solid rgba(255,255,255,.08);
}

.modal-header h3{
    font-size:18px;
    font-weight:600;
}

.modal-close{
    background:none;
    border:none;
    color:#fff;
    font-size:20px;
    cursor:pointer;
}

/* body */
.modal-body{
    padding:22px;
}

/* file info */
.modal-body .download-info{
    text-align:center;
    margin-bottom:20px;
}

.modal-body .download-info i{
    font-size:34px;
    margin-bottom:8px;
    color:#ff4655;
}

.download-file-name{
    opacity:.8;
    margin-top:4px;
}

.download-file-size{
    font-size:13px;
    opacity:.7;
}

/* progress bar */
.progress-bar{
    width:100%;
    height:10px;
    background:#0a0f16;
    border-radius:20px;
    overflow:hidden;
    margin-top:15px;
}

.progress-fill{
    height:100%;
    width:0%;
    background:linear-gradient(90deg,#ff4655,#ffb347);
    transition:width .2s linear;
}

.progress-info{
    display:flex;
    justify-content:space-between;
    margin-top:8px;
    font-size:13px;
    opacity:.85;
}

.download-speed{
    margin-top:5px;
    font-size:12px;
    opacity:.7;
    text-align:right;
}

/* source buttons */
.option-buttons{
    display:grid;
    grid-template-columns:repeat(2,1fr);
    gap:10px;
    margin-top:12px;
}

.option-btn{
    background:#0a111a;
    border:1px solid rgba(255,255,255,.1);
    padding:10px;
    border-radius:8px;
    cursor:pointer;
    transition:.2s;
}

.option-btn.active{
    border-color:#ff4655;
    box-shadow:0 0 12px rgba(255,70,85,.4);
}

/* footer buttons */
.modal-footer{
    padding:15px;
    display:flex;
    gap:10px;
    border-top:1px solid rgba(255,255,255,.08);
}

.modal-footer button{
    flex:1;
}

#startDownload{
    background:#ffb347;
    color:#000;
    font-weight:600;
}

/* ================= SUCCESS MODAL ================= */

.success-modal{
    position:fixed;
    inset:0;
    background:rgba(0,0,0,.7);
    display:flex;
    align-items:center;
    justify-content:center;
    z-index:10000;
}

.success-modal .modal-content{
    width:480px;
    max-width:95%;
    text-align:center;
}

.success-icon{
    font-size:55px;
    color:#3cff91;
    margin:10px 0;
}

/* ================= MOBILE ================= */

@media(max-width:600px){

.modal-content{
    width:92% !important;
}

.option-buttons{
    grid-template-columns:1fr;
}

.modal-footer{
    flex-direction:column;
}

}

/* ===== DOWNLOAD SOURCE TEXT FIX ===== */

.option-btn{
    color:#e6edf3;
    font-weight:500;
}

.option-btn i{
    color:#ff4655;
    margin-right:6px;
}

/* hover */
.option-btn:hover{
    background:#121a26;
    border-color:#ff4655;
    color:#ffffff;
}

/* active selected */
.option-btn.active{
    color:#ffffff;
    background:linear-gradient(180deg,#111a26,#0c131d);
    border-color:#ff4655;
    box-shadow:0 0 12px rgba(255,70,85,.45);
}
.option-btn.active i{
    color:#ffb347;
}